From bf3e9cfaaafa617929c7844d1c19901e98ac6081 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sat, 2 Nov 2013 22:11:53 -0700 Subject: [PATCH] Issue #2112705 by mikey_p: Replace EntityType::$module with provider. --- core/includes/config.inc | 20 ------------------- .../Core/Entity/Annotation/EntityType.php | 7 ------- .../lib/Drupal/aggregator/Entity/Feed.php | 1 - .../lib/Drupal/aggregator/Entity/Item.php | 1 - .../custom_block/Entity/CustomBlock.php | 1 - .../custom_block/Entity/CustomBlockType.php | 1 - .../block/lib/Drupal/block/Entity/Block.php | 1 - .../Drupal/breakpoint/Entity/Breakpoint.php | 1 - .../breakpoint/Entity/BreakpointGroup.php | 1 - .../lib/Drupal/comment/Entity/Comment.php | 1 - .../config_test/Entity/ConfigQueryTest.php | 1 - .../Drupal/config_test/Entity/ConfigTest.php | 1 - .../lib/Drupal/contact/Entity/Category.php | 1 - .../lib/Drupal/contact/Entity/Message.php | 1 - .../lib/Drupal/editor/Entity/Editor.php | 1 - core/modules/entity/entity.module | 2 +- .../Drupal/entity/Entity/EntityDisplay.php | 1 - .../entity/Entity/EntityFormDisplay.php | 1 - .../Drupal/entity/Entity/EntityFormMode.php | 1 - .../Drupal/entity/Entity/EntityViewMode.php | 1 - .../field/lib/Drupal/field/Entity/Field.php | 1 - .../lib/Drupal/field/Entity/FieldInstance.php | 1 - .../Entity/FieldUITestNoBundle.php | 1 - .../file/lib/Drupal/file/Entity/File.php | 1 - .../lib/Drupal/filter/Entity/FilterFormat.php | 1 - .../lib/Drupal/image/Entity/ImageStyle.php | 1 - .../lib/Drupal/language/Entity/Language.php | 1 - .../lib/Drupal/menu_link/Entity/MenuLink.php | 1 - .../node/lib/Drupal/node/Entity/Node.php | 1 - .../node/lib/Drupal/node/Entity/NodeType.php | 1 - .../Drupal/picture/Entity/PictureMapping.php | 1 - .../rdf/lib/Drupal/rdf/Entity/RdfMapping.php | 1 - .../Drupal/shortcut/Entity/ShortcutSet.php | 1 - .../lib/Drupal/system/Entity/Action.php | 1 - .../lib/Drupal/system/Entity/DateFormat.php | 1 - .../system/lib/Drupal/system/Entity/Menu.php | 1 - .../Entity/EntityCacheTest.php | 3 +-- .../modules/entity_test/entity_test.module | 6 +++--- .../Drupal/entity_test/Entity/EntityTest.php | 1 - .../entity_test/Entity/EntityTestCache.php | 1 - .../Entity/EntityTestDefaultAccess.php | 1 - .../entity_test/Entity/EntityTestLabel.php | 1 - .../Entity/EntityTestLabelCallback.php | 1 - .../entity_test/Entity/EntityTestMul.php | 1 - .../entity_test/Entity/EntityTestMulRev.php | 1 - .../entity_test/Entity/EntityTestNoLabel.php | 1 - .../entity_test/Entity/EntityTestRev.php | 1 - .../lib/Drupal/taxonomy/Entity/Term.php | 1 - .../lib/Drupal/taxonomy/Entity/Vocabulary.php | 1 - .../tour/lib/Drupal/tour/Entity/Tour.php | 1 - .../user/lib/Drupal/user/Entity/Role.php | 1 - .../user/lib/Drupal/user/Entity/User.php | 1 - .../views/lib/Drupal/views/Entity/View.php | 1 - 53 files changed, 5 insertions(+), 81 deletions(-) diff --git a/core/includes/config.inc b/core/includes/config.inc index 6f55e6152190..8e9ce5e02790 100644 --- a/core/includes/config.inc +++ b/core/includes/config.inc @@ -191,26 +191,6 @@ function config_context_leave() { ->leaveContext(); } -/** - * 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. * diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 40c14479cd5c..b46d9f71cb77 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -16,13 +16,6 @@ */ class EntityType extends Plugin { - /** - * The name of the module providing the type. - * - * @var string - */ - public $module; - /** * The name of the entity type class. * diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php index ea123402b799..ca99fa68f212 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 927b2cc6aed6..3007200be0f7 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 94464516b488..2baf1fe61efb 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 c5444deb7b2f..8321d70a036a 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 f11031e42afc..f433ea693b82 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 a149e6804272..073613185da3 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 6a3150a952f6..5f32b5ee118c 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 35db48460d95..1db39833ff2f 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 6c550572235a..5aed97f8e44a 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 c4d330e6f477..19ee07f068b4 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 2e6dd3bb336d..e6367138fd56 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 ec59424a03f2..9e424fa2c4b0 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 8f253681c965..a7bc66cfea08 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 2749bcdd0601..5e3602ca0f09 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 8b5936663f47..e684a596828b 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 1e04cfb8010c..461f7ce1fd9b 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 1ac34da68b1e..533321c2fb72 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 6a4abad02e64..6107d4ffe91c 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 0a8d1a4e002b..47003fb57fed 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 6d43b630f94e..8fe1d1c4e4e9 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 5389036d22b0..e6841c5571f1 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 a620533c5de2..3239cdffb5c1 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 59866f2afd2d..6c4bf5b7f7f7 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 4b8cf5a6e036..a8d0e212903d 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 c1c10069f114..d4c8e1b987bf 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 3c1a0997d745..1a10efec64a0 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 4633508e0a39..d7b1f6a7d92c 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 0fb1eccb3bde..fb13664f43c8 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 c5a6e982b868..f059079efda9 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 094aa19c44ae..3b409dd36068 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 b52fccbe8470..d826f70d37dc 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 27ba395baee3..4962a92d97d8 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 54e58d8d5360..fb4c7d36257b 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 4727f8aed768..5f6d0756f893 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 1aad43719dcf..7a81687f0881 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 3ffcd2243658..c8f868e29c3e 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 531d6d6de2b3..8695b113898e 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 a1c66cd17bc8..55a7b5e8a7e9 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 4893c83201d6..572dcbb94482 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 da3a31c3010d..13041a42cedf 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 1784aa28c453..92012a3a348c 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 76db7abfed77..d3e0fb3a1b0a 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 407640b5294a..3d8df50f03f6 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 f56a5e0fa95a..a227a345dbd1 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 a6cd7bff7dac..19760e8471b7 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 415aba0116e3..033c5f14ffd8 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 721d5eaaf6d7..fe6669b23d0f 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 f686d6d26285..35a33b2318db 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 5bb6631599e1..d58a3589adc4 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 4180551eaf72..359031a38d69 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 ceb423e49264..1420ed8fd6ca 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" -- GitLab