commit 38a07385f0ef52dfde6218aac1e1d4b6bb79f153 Author: larowlan Date: Mon May 2 18:36:36 2016 +1000 Issue #2717051 by larowlan, benjy: Allow previewed message to be positioned in manage form display diff --git a/contact_storage.module b/contact_storage.module index 13484c0..8b05153 100644 --- a/contact_storage.module +++ b/contact_storage.module @@ -193,7 +193,7 @@ function contact_storage_entity_type_alter(array &$entity_types) { */ function contact_storage_entity_extra_field_info() { $fields = array(); - foreach (array_keys(entity_get_bundles('contact_message')) as $bundle) { + foreach (array_keys(\Drupal::service('entity_type.bundle.info')->getBundleInfo('contact_message')) as $bundle) { $fields['contact_message'][$bundle]['form']['preview'] = array( 'label' => t('Preview'), 'description' => t('Rendered preview'), diff --git a/src/Tests/ContactStorageTest.php b/src/Tests/ContactStorageTest.php index 47cf42f..5b7c662 100644 --- a/src/Tests/ContactStorageTest.php +++ b/src/Tests/ContactStorageTest.php @@ -47,6 +47,7 @@ class ContactStorageTest extends ContactStorageTestBase { 'administer users', 'administer account settings', 'administer contact_message fields', + 'administer contact_message form display', 'administer contact_message display', )); $this->drupalLogin($admin_user);