diff --git a/core/includes/config.inc b/core/includes/config.inc index 6f55e61..8e9ce5e 100644 --- a/core/includes/config.inc +++ b/core/includes/config.inc @@ -192,26 +192,6 @@ function config_context_leave() { } /** - * Return a list of all config entity types provided by a module. - * - * @param string $module - * The name of the module possibly providing config entities. - * - * @return array - * An associative array containing the entity info for any config entities - * provided by the requested module, keyed by the entity type. - */ -function config_get_module_config_entities($module) { - // While this is a lot of work to generate, it's not worth static caching - // since this function is only called at install/uninstall, and only - // once per module. - $info = entity_get_info(); - return array_filter($info, function($entity_info) use ($module) { - return ($entity_info['module'] == $module) && is_subclass_of($entity_info['class'], 'Drupal\Core\Config\Entity\ConfigEntityInterface'); - }); -} - -/** * Returns the entity type of a configuration object. * * @param string $name diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 40c1447..b46d9f7 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -17,13 +17,6 @@ class EntityType extends Plugin { /** - * The name of the module providing the type. - * - * @var string - */ - public $module; - - /** * The name of the entity type class. * * This is not provided manually, it will be added by the discovery mechanism. diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php index ea12340..ca99fa6 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php @@ -20,7 +20,6 @@ * @EntityType( * id = "aggregator_feed", * label = @Translation("Aggregator feed"), - * module = "aggregator", * controllers = { * "storage" = "Drupal\aggregator\FeedStorageController", * "view_builder" = "Drupal\aggregator\FeedViewBuilder", diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php index 927b2cc..3007200 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php @@ -19,7 +19,6 @@ * @EntityType( * id = "aggregator_item", * label = @Translation("Aggregator feed item"), - * module = "aggregator", * controllers = { * "storage" = "Drupal\aggregator\ItemStorageController", * "view_builder" = "Drupal\aggregator\ItemViewBuilder" diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php index 9446451..2baf1fe 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php @@ -20,7 +20,6 @@ * id = "custom_block", * label = @Translation("Custom Block"), * bundle_label = @Translation("Custom Block type"), - * module = "custom_block", * controllers = { * "storage" = "Drupal\custom_block\CustomBlockStorageController", * "access" = "Drupal\custom_block\CustomBlockAccessController", diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php index c5444de..8321d70 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php @@ -19,7 +19,6 @@ * @EntityType( * id = "custom_block_type", * label = @Translation("Custom block type"), - * module = "custom_block", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "form" = { diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php index f11031e..f433ea6 100644 --- a/core/modules/block/lib/Drupal/block/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Entity/Block.php @@ -20,7 +20,6 @@ * @EntityType( * id = "block", * label = @Translation("Block"), - * module = "block", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\block\BlockAccessController", diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php index a149e68..0736131 100644 --- a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php +++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php @@ -23,7 +23,6 @@ * @EntityType( * id = "breakpoint", * label = @Translation("Breakpoint"), - * module = "breakpoint", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php index 6a3150a..5f32b5e 100644 --- a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php +++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php @@ -20,7 +20,6 @@ * @EntityType( * id = "breakpoint_group", * label = @Translation("Breakpoint group"), - * module = "breakpoint", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php index 35db484..1db3983 100644 --- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php @@ -21,7 +21,6 @@ * id = "comment", * label = @Translation("Comment"), * bundle_label = @Translation("Content type"), - * module = "comment", * controllers = { * "storage" = "Drupal\comment\CommentStorageController", * "access" = "Drupal\comment\CommentAccessController", diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php index 6c55057..5aed97f 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php @@ -16,7 +16,6 @@ * @EntityType( * id = "config_query_test", * label = @Translation("Test configuration for query"), - * module = "config_test", * controllers = { * "storage" = "Drupal\config_test\ConfigTestStorageController", * "list" = "Drupal\Core\Config\Entity\ConfigEntityListController", diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php index c4d330e..19ee07f 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php @@ -18,7 +18,6 @@ * @EntityType( * id = "config_test", * label = @Translation("Test configuration"), - * module = "config_test", * controllers = { * "storage" = "Drupal\config_test\ConfigTestStorageController", * "list" = "Drupal\config_test\ConfigTestListController", diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Category.php b/core/modules/contact/lib/Drupal/contact/Entity/Category.php index 2e6dd3b..e636713 100644 --- a/core/modules/contact/lib/Drupal/contact/Entity/Category.php +++ b/core/modules/contact/lib/Drupal/contact/Entity/Category.php @@ -19,7 +19,6 @@ * @EntityType( * id = "contact_category", * label = @Translation("Contact category"), - * module = "contact", * controllers = { * "storage" = "Drupal\contact\CategoryStorageController", * "access" = "Drupal\contact\CategoryAccessController", diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Message.php b/core/modules/contact/lib/Drupal/contact/Entity/Message.php index ec59424..9e424fa 100644 --- a/core/modules/contact/lib/Drupal/contact/Entity/Message.php +++ b/core/modules/contact/lib/Drupal/contact/Entity/Message.php @@ -16,7 +16,6 @@ * @EntityType( * id = "contact_message", * label = @Translation("Contact message"), - * module = "contact", * controllers = { * "storage" = "Drupal\Core\Entity\FieldableDatabaseStorageController", * "view_builder" = "Drupal\contact\MessageViewBuilder", diff --git a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php index 8f25368..a7bc66c 100644 --- a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php +++ b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php @@ -18,7 +18,6 @@ * @EntityType( * id = "editor", * label = @Translation("Editor"), - * module = "editor", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module index 2749bcd..5e3602c 100644 --- a/core/modules/entity/entity.module +++ b/core/modules/entity/entity.module @@ -164,7 +164,7 @@ function entity_module_preuninstall($module) { // Clean up all entity bundles (including field instances) of every entity // type provided by the module that is being uninstalled. foreach (\Drupal::entityManager()->getDefinitions() as $entity_type => $entity_info) { - if ($entity_info['module'] == $module) { + if ($entity_info['provider'] == $module) { foreach (array_keys(entity_get_bundles($entity_type)) as $bundle) { entity_invoke_bundle_hook('delete', $entity_type, $bundle); } diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityDisplay.php index 8b59366..e684a59 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityDisplay.php @@ -19,7 +19,6 @@ * @EntityType( * id = "entity_display", * label = @Translation("Entity display"), - * module = "entity", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php index 1e04cfb..461f7ce 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php @@ -19,7 +19,6 @@ * @EntityType( * id = "entity_form_display", * label = @Translation("Entity form display"), - * module = "entity", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php index 1ac34da..533321c 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php @@ -32,7 +32,6 @@ * @EntityType( * id = "form_mode", * label = @Translation("Form mode"), - * module = "entity", * controllers = { * "list" = "Drupal\entity\EntityFormModeListController", * "form" = { diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php index 6a4abad..6107d4f 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php @@ -33,7 +33,6 @@ * @EntityType( * id = "view_mode", * label = @Translation("View mode"), - * module = "entity", * controllers = { * "list" = "Drupal\entity\EntityDisplayModeListController", * "form" = { diff --git a/core/modules/field/lib/Drupal/field/Entity/Field.php b/core/modules/field/lib/Drupal/field/Entity/Field.php index 0a8d1a4..47003fb 100644 --- a/core/modules/field/lib/Drupal/field/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Entity/Field.php @@ -22,7 +22,6 @@ * @EntityType( * id = "field_entity", * label = @Translation("Field"), - * module = "field", * controllers = { * "storage" = "Drupal\field\FieldStorageController" * }, diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldInstance.php b/core/modules/field/lib/Drupal/field/Entity/FieldInstance.php index 6d43b63..8fe1d1c 100644 --- a/core/modules/field/lib/Drupal/field/Entity/FieldInstance.php +++ b/core/modules/field/lib/Drupal/field/Entity/FieldInstance.php @@ -18,7 +18,6 @@ * @EntityType( * id = "field_instance", * label = @Translation("Field instance"), - * module = "field", * controllers = { * "storage" = "Drupal\field\FieldInstanceStorageController" * }, diff --git a/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php b/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php index 5389036..e6841c5 100644 --- a/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php +++ b/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php @@ -17,7 +17,6 @@ * @EntityType( * id = "field_ui_test_no_bundle", * label = @Translation("Test Field UI entity, no bundle"), - * module = "field_ui_test", * controllers = { * "storage" = "Drupal\Core\Entity\DatabaseStorageController" * }, diff --git a/core/modules/file/lib/Drupal/file/Entity/File.php b/core/modules/file/lib/Drupal/file/Entity/File.php index a620533..3239cdf 100644 --- a/core/modules/file/lib/Drupal/file/Entity/File.php +++ b/core/modules/file/lib/Drupal/file/Entity/File.php @@ -21,7 +21,6 @@ * @EntityType( * id = "file", * label = @Translation("File"), - * module = "file", * controllers = { * "storage" = "Drupal\file\FileStorageController", * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder" diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php index 59866f2..6c4bf5b 100644 --- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php @@ -20,7 +20,6 @@ * @EntityType( * id = "filter_format", * label = @Translation("Text format"), - * module = "filter", * controllers = { * "form" = { * "add" = "Drupal\filter\FilterFormatAddFormController", diff --git a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php index 4b8cf5a..a8d0e21 100644 --- a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php @@ -24,7 +24,6 @@ * @EntityType( * id = "image_style", * label = @Translation("Image style"), - * module = "image", * controllers = { * "form" = { * "add" = "Drupal\image\Form\ImageStyleAddForm", diff --git a/core/modules/language/lib/Drupal/language/Entity/Language.php b/core/modules/language/lib/Drupal/language/Entity/Language.php index c1c1006..d4c8e1b 100644 --- a/core/modules/language/lib/Drupal/language/Entity/Language.php +++ b/core/modules/language/lib/Drupal/language/Entity/Language.php @@ -20,7 +20,6 @@ * @EntityType( * id = "language_entity", * label = @Translation("Language"), - * module = "language", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "list" = "Drupal\language\LanguageListController", diff --git a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php index 3c1a099..1a10efe 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php @@ -24,7 +24,6 @@ * @EntityType( * id = "menu_link", * label = @Translation("Menu link"), - * module = "menu_link", * controllers = { * "storage" = "Drupal\menu_link\MenuLinkStorageController", * "access" = "Drupal\menu_link\MenuLinkAccessController", diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php index 4633508..d7b1f6a 100644 --- a/core/modules/node/lib/Drupal/node/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Entity/Node.php @@ -20,7 +20,6 @@ * id = "node", * label = @Translation("Content"), * bundle_label = @Translation("Content type"), - * module = "node", * controllers = { * "storage" = "Drupal\node\NodeStorageController", * "view_builder" = "Drupal\node\NodeViewBuilder", diff --git a/core/modules/node/lib/Drupal/node/Entity/NodeType.php b/core/modules/node/lib/Drupal/node/Entity/NodeType.php index 0fb1ecc..fb13664 100644 --- a/core/modules/node/lib/Drupal/node/Entity/NodeType.php +++ b/core/modules/node/lib/Drupal/node/Entity/NodeType.php @@ -19,7 +19,6 @@ * @EntityType( * id = "node_type", * label = @Translation("Content type"), - * module = "node", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\node\NodeTypeAccessController", diff --git a/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php b/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php index c5a6e98..f059079 100644 --- a/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php +++ b/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php @@ -18,7 +18,6 @@ * @EntityType( * id = "picture_mapping", * label = @Translation("Picture mapping"), - * module = "picture", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "list" = "Drupal\picture\PictureMappingListController", diff --git a/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php b/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php index 094aa19..3b409dd 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php +++ b/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php @@ -19,7 +19,6 @@ * @EntityType( * id = "rdf_mapping", * label = @Translation("RDF mapping"), - * module = "rdf", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php b/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php index b52fccb..d826f70 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php @@ -19,7 +19,6 @@ * @EntityType( * id = "shortcut_set", * label = @Translation("Shortcut set"), - * module = "shortcut", * controllers = { * "storage" = "Drupal\shortcut\ShortcutSetStorageController", * "access" = "Drupal\shortcut\ShortcutSetAccessController", diff --git a/core/modules/system/lib/Drupal/system/Entity/Action.php b/core/modules/system/lib/Drupal/system/Entity/Action.php index 27ba395..4962a92 100644 --- a/core/modules/system/lib/Drupal/system/Entity/Action.php +++ b/core/modules/system/lib/Drupal/system/Entity/Action.php @@ -21,7 +21,6 @@ * @EntityType( * id = "action", * label = @Translation("Action"), - * module = "system", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * }, diff --git a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php index 54e58d8..fb4c7d3 100644 --- a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php +++ b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php @@ -20,7 +20,6 @@ * @EntityType( * id = "date_format", * label = @Translation("Date format"), - * module = "system", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\system\DateFormatAccessController", diff --git a/core/modules/system/lib/Drupal/system/Entity/Menu.php b/core/modules/system/lib/Drupal/system/Entity/Menu.php index 4727f8a..5f6d075 100644 --- a/core/modules/system/lib/Drupal/system/Entity/Menu.php +++ b/core/modules/system/lib/Drupal/system/Entity/Menu.php @@ -18,7 +18,6 @@ * @EntityType( * id = "menu", * label = @Translation("Menu"), - * module = "system", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\system\MenuAccessController" diff --git a/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php b/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php index 1aad437..7a81687 100644 --- a/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php +++ b/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php @@ -19,8 +19,7 @@ * label = @Translation("Entity cache test"), * controllers = { * "storage" = "Drupal\Core\Entity\DatabaseStorageController", - * }, - * module = "entity_cache_test_dependency" + * } * ) */ class EntityCacheTest extends Entity { diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index 3ffcd22..c8f868e 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -147,7 +147,7 @@ function entity_test_entity_bundle_info() { $bundles = array(); $entity_info = entity_get_info(); foreach ($entity_info as $entity_type => $info) { - if ($info['module'] == 'entity_test') { + if ($info['provider'] == 'entity_test') { $bundles[$entity_type] = \Drupal::state()->get($entity_type . '.bundles') ?: array($entity_type => array('label' => 'Entity Test Bundle')); } } @@ -160,7 +160,7 @@ function entity_test_entity_bundle_info() { function entity_test_entity_view_mode_info_alter(&$view_modes) { $entity_info = entity_get_info(); foreach ($entity_info as $entity_type => $info) { - if ($entity_info[$entity_type]['module'] == 'entity_test' && !isset($view_modes[$entity_type])) { + if ($entity_info[$entity_type]['provider'] == 'entity_test' && !isset($view_modes[$entity_type])) { $view_modes[$entity_type] = array( 'full' => array( 'label' => t('Full object'), @@ -183,7 +183,7 @@ function entity_test_entity_view_mode_info_alter(&$view_modes) { function entity_test_entity_form_mode_info_alter(&$form_modes) { $entity_info = entity_get_info(); foreach ($entity_info as $entity_type => $info) { - if ($entity_info[$entity_type]['module'] == 'entity_test') { + if ($entity_info[$entity_type]['provider'] == 'entity_test') { $form_modes[$entity_type] = array( 'compact' => array( 'label' => t('Compact version'), diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php index 531d6d6..8695b11 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php @@ -18,7 +18,6 @@ * @EntityType( * id = "entity_test", * label = @Translation("Test entity"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", * "list" = "Drupal\entity_test\EntityTestListController", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php index a1c66cd..55a7b5e 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php @@ -17,7 +17,6 @@ * @EntityType( * id = "entity_test_cache", * label = @Translation("Test entity with field cache"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", * "access" = "Drupal\entity_test\EntityTestAccessController", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestDefaultAccess.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestDefaultAccess.php index 4893c83..572dcbb 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestDefaultAccess.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestDefaultAccess.php @@ -16,7 +16,6 @@ * @EntityType( * id = "entity_test_default_access", * label = @Translation("Test entity with default access"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabel.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabel.php index da3a31c..13041a4 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabel.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabel.php @@ -16,7 +16,6 @@ * @EntityType( * id = "entity_test_label", * label = @Translation("Entity Test label"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder" diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabelCallback.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabelCallback.php index 1784aa2..92012a3 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabelCallback.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestLabelCallback.php @@ -16,7 +16,6 @@ * @EntityType( * id = "entity_test_label_callback", * label = @Translation("Entity test label callback"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php index 76db7ab..d3e0fb3 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php @@ -17,7 +17,6 @@ * @EntityType( * id = "entity_test_mul", * label = @Translation("Test entity - data table"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", * "access" = "Drupal\entity_test\EntityTestAccessController", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php index 407640b..3d8df50 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php @@ -17,7 +17,6 @@ * @EntityType( * id = "entity_test_mulrev", * label = @Translation("Test entity - revisions and data table"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", * "access" = "Drupal\entity_test\EntityTestAccessController", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestNoLabel.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestNoLabel.php index f56a5e0..a227a34 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestNoLabel.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestNoLabel.php @@ -16,7 +16,6 @@ * @EntityType( * id = "entity_test_no_label", * label = @Translation("Entity Test without label"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php index a6cd7bf..19760e8 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php @@ -17,7 +17,6 @@ * @EntityType( * id = "entity_test_rev", * label = @Translation("Test entity - revisions"), - * module = "entity_test", * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", * "access" = "Drupal\entity_test\EntityTestAccessController", diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php index 415aba0..033c5f1 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php @@ -21,7 +21,6 @@ * id = "taxonomy_term", * label = @Translation("Taxonomy term"), * bundle_label = @Translation("Vocabulary"), - * module = "taxonomy", * controllers = { * "storage" = "Drupal\taxonomy\TermStorageController", * "view_builder" = "Drupal\taxonomy\TermViewBuilder", diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php index 721d5ea..fe6669b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php @@ -19,7 +19,6 @@ * @EntityType( * id = "taxonomy_vocabulary", * label = @Translation("Taxonomy vocabulary"), - * module = "taxonomy", * controllers = { * "storage" = "Drupal\taxonomy\VocabularyStorageController", * "list" = "Drupal\taxonomy\VocabularyListController", diff --git a/core/modules/tour/lib/Drupal/tour/Entity/Tour.php b/core/modules/tour/lib/Drupal/tour/Entity/Tour.php index f686d6d..35a33b2 100644 --- a/core/modules/tour/lib/Drupal/tour/Entity/Tour.php +++ b/core/modules/tour/lib/Drupal/tour/Entity/Tour.php @@ -19,7 +19,6 @@ * @EntityType( * id = "tour", * label = @Translation("Tour"), - * module = "tour", * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "view_builder" = "Drupal\tour\TourViewBuilder" diff --git a/core/modules/user/lib/Drupal/user/Entity/Role.php b/core/modules/user/lib/Drupal/user/Entity/Role.php index 5bb6631..d58a358 100644 --- a/core/modules/user/lib/Drupal/user/Entity/Role.php +++ b/core/modules/user/lib/Drupal/user/Entity/Role.php @@ -17,7 +17,6 @@ * @EntityType( * id = "user_role", * label = @Translation("Role"), - * module = "user", * controllers = { * "storage" = "Drupal\user\RoleStorageController", * "access" = "Drupal\user\RoleAccessController", diff --git a/core/modules/user/lib/Drupal/user/Entity/User.php b/core/modules/user/lib/Drupal/user/Entity/User.php index 4180551..359031a 100644 --- a/core/modules/user/lib/Drupal/user/Entity/User.php +++ b/core/modules/user/lib/Drupal/user/Entity/User.php @@ -18,7 +18,6 @@ * @EntityType( * id = "user", * label = @Translation("User"), - * module = "user", * controllers = { * "storage" = "Drupal\user\UserStorageController", * "access" = "Drupal\user\UserAccessController", diff --git a/core/modules/views/lib/Drupal/views/Entity/View.php b/core/modules/views/lib/Drupal/views/Entity/View.php index ceb423e..1420ed8 100644 --- a/core/modules/views/lib/Drupal/views/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Entity/View.php @@ -20,7 +20,6 @@ * @EntityType( * id = "view", * label = @Translation("View"), - * module = "views", * controllers = { * "storage" = "Drupal\views\ViewStorageController", * "access" = "Drupal\views\ViewAccessController"