summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2014-03-27 11:54:40 (GMT)
committercatch2014-03-27 11:54:40 (GMT)
commit2f959b9693fc2c386a223fd418c5d8fc76441629 (patch)
tree0347ad995a03af8e480b2ba39978ac5f2d6c0d8c
parent2421c75fbed02522179a9c05b41e10dd7b154075 (diff)
Issue #2188613 by Berdir, Xen, andypost: Rename EntityStorageController to EntityStorage.
-rw-r--r--core/includes/entity.inc59
-rw-r--r--core/includes/menu.inc8
-rw-r--r--core/lib/Drupal/Core/Config/ConfigImporter.php8
-rw-r--r--core/lib/Drupal/Core/Config/ConfigInstaller.php2
-rw-r--r--core/lib/Drupal/Core/Config/ConfigManager.php6
-rw-r--r--core/lib/Drupal/Core/Config/DatabaseStorage.php2
-rw-r--r--core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php10
-rw-r--r--core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php (renamed from core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php)26
-rw-r--r--core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php (renamed from core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php)6
-rw-r--r--core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php2
-rw-r--r--core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php4
-rw-r--r--core/lib/Drupal/Core/Datetime/Date.php4
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityBase.php4
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php (renamed from core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php)18
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php (renamed from core/lib/Drupal/Core/Entity/FieldableNullStorageController.php)6
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php (renamed from core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php)12
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityType.php2
-rw-r--r--core/lib/Drupal/Core/Entity/Entity.php18
-rw-r--r--core/lib/Drupal/Core/Entity/EntityControllerInterface.php2
-rw-r--r--core/lib/Drupal/Core/Entity/EntityDatabaseStorage.php (renamed from core/lib/Drupal/Core/Entity/DatabaseStorageController.php)10
-rw-r--r--core/lib/Drupal/Core/Entity/EntityInterface.php42
-rw-r--r--core/lib/Drupal/Core/Entity/EntityListBuilder.php14
-rw-r--r--core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php8
-rw-r--r--core/lib/Drupal/Core/Entity/EntityManager.php4
-rw-r--r--core/lib/Drupal/Core/Entity/EntityManagerInterface.php10
-rw-r--r--core/lib/Drupal/Core/Entity/EntityStorageBase.php (renamed from core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php)8
-rw-r--r--core/lib/Drupal/Core/Entity/EntityStorageInterface.php (renamed from core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php)10
-rw-r--r--core/lib/Drupal/Core/Entity/EntityTypeInterface.php12
-rw-r--r--core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php (renamed from core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerInterface.php)4
-rw-r--r--core/lib/Drupal/Core/Entity/HtmlEntityFormController.php2
-rw-r--r--core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php2
-rw-r--r--core/lib/Drupal/Core/Entity/Query/QueryBase.php10
-rw-r--r--core/lib/Drupal/Core/Entity/Query/QueryFactory.php4
-rw-r--r--core/lib/Drupal/Core/Entity/Query/QueryInterface.php8
-rw-r--r--core/lib/Drupal/Core/Entity/Query/Sql/Tables.php14
-rw-r--r--core/lib/Drupal/Core/Entity/RevisionableInterface.php6
-rw-r--r--core/lib/Drupal/Core/Field/FieldDefinition.php2
-rw-r--r--core/lib/Drupal/Core/Field/FieldDefinitionInterface.php7
-rw-r--r--core/lib/Drupal/Core/ParamConverter/EntityConverter.php2
-rw-r--r--core/lib/Drupal/Core/Session/UserSession.php2
-rw-r--r--core/modules/action/lib/Drupal/action/ActionAddFormController.php12
-rw-r--r--core/modules/action/lib/Drupal/action/ActionFormControllerBase.php20
-rw-r--r--core/modules/action/lib/Drupal/action/ActionListBuilder.php10
-rw-r--r--core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php10
-rw-r--r--core/modules/aggregator/aggregator.module2
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php16
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php12
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php4
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php4
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php (renamed from core/modules/aggregator/lib/Drupal/aggregator/FeedStorageController.php)10
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/FeedStorageInterface.php (renamed from core/modules/aggregator/lib/Drupal/aggregator/FeedStorageControllerInterface.php)6
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php20
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php (renamed from core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php)10
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/ItemStorageInterface.php (renamed from core/modules/aggregator/lib/Drupal/aggregator/ItemStorageControllerInterface.php)6
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php26
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php14
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php2
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php2
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Tests/DeleteFeedTest.php2
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php18
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php24
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php12
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php10
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php10
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php2
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php10
-rw-r--r--core/modules/block/lib/Drupal/block/BlockFormController.php10
-rw-r--r--core/modules/block/lib/Drupal/block/BlockListBuilder.php10
-rw-r--r--core/modules/block/lib/Drupal/block/Controller/BlockAddController.php2
-rw-r--r--core/modules/block/lib/Drupal/block/Entity/Block.php10
-rw-r--r--core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php2
-rw-r--r--core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php10
-rw-r--r--core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php2
-rw-r--r--core/modules/block/lib/Drupal/block/Tests/BlockViewBuilderTest.php6
-rw-r--r--core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php16
-rw-r--r--core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php4
-rw-r--r--core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php6
-rw-r--r--core/modules/book/lib/Drupal/book/BookExport.php6
-rw-r--r--core/modules/book/lib/Drupal/book/BookManager.php10
-rw-r--r--core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php14
-rw-r--r--core/modules/book/lib/Drupal/book/Tests/BookTest.php6
-rw-r--r--core/modules/breakpoint/breakpoint.module2
-rw-r--r--core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php2
-rw-r--r--core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php2
-rw-r--r--core/modules/comment/comment.install2
-rw-r--r--core/modules/comment/comment.module2
-rw-r--r--core/modules/comment/lib/Drupal/comment/CommentBreadcrumbBuilder.php2
-rw-r--r--core/modules/comment/lib/Drupal/comment/CommentFormController.php6
-rw-r--r--core/modules/comment/lib/Drupal/comment/CommentManager.php16
-rw-r--r--core/modules/comment/lib/Drupal/comment/CommentStorage.php (renamed from core/modules/comment/lib/Drupal/comment/CommentStorageController.php)12
-rw-r--r--core/modules/comment/lib/Drupal/comment/CommentStorageInterface.php (renamed from core/modules/comment/lib/Drupal/comment/CommentStorageControllerInterface.php)6
-rw-r--r--core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php6
-rw-r--r--core/modules/comment/lib/Drupal/comment/Controller/CommentController.php8
-rw-r--r--core/modules/comment/lib/Drupal/comment/Entity/Comment.php28
-rw-r--r--core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php12
-rw-r--r--core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php10
-rw-r--r--core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php20
-rw-r--r--core/modules/comment/lib/Drupal/comment/Plugin/Validation/Constraint/CommentNameConstraintValidator.php2
-rw-r--r--core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php10
-rw-r--r--core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php1
-rw-r--r--core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php6
-rw-r--r--core/modules/config/lib/Drupal/config/Form/ConfigSingleExportForm.php2
-rw-r--r--core/modules/config/lib/Drupal/config/Form/ConfigSingleImportForm.php4
-rw-r--r--core/modules/config/lib/Drupal/config/Tests/ConfigDependencyTest.php4
-rw-r--r--core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php14
-rw-r--r--core/modules/config/lib/Drupal/config/Tests/ConfigEntityStorageTest.php (renamed from core/modules/config/lib/Drupal/config/Tests/ConfigEntityStorageControllerTest.php)4
-rw-r--r--core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php10
-rw-r--r--core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php4
-rw-r--r--core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php12
-rw-r--r--core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestStorage.php (renamed from core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestStorageController.php)12
-rw-r--r--core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php2
-rw-r--r--core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php2
-rw-r--r--core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListBuilder.php6
-rw-r--r--core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListBuilder.php10
-rw-r--r--core/modules/contact/lib/Drupal/contact/Controller/ContactController.php6
-rw-r--r--core/modules/contact/lib/Drupal/contact/Entity/Category.php10
-rw-r--r--core/modules/contact/lib/Drupal/contact/Entity/Message.php2
-rw-r--r--core/modules/contact/lib/Drupal/contact/Tests/MessageEntityTest.php2
-rw-r--r--core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php4
-rw-r--r--core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php2
-rw-r--r--core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php6
-rw-r--r--core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php14
-rw-r--r--core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php4
-rw-r--r--core/modules/edit/lib/Drupal/edit/Access/EditEntityAccessCheck.php2
-rw-r--r--core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php2
-rw-r--r--core/modules/edit/lib/Drupal/edit/EditController.php2
-rw-r--r--core/modules/edit/lib/Drupal/edit/Form/EditFieldForm.php10
-rw-r--r--core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityAccessCheckTest.php14
-rw-r--r--core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityFieldAccessCheckTest.php14
-rw-r--r--core/modules/editor/lib/Drupal/editor/EditorController.php2
-rw-r--r--core/modules/editor/lib/Drupal/editor/Entity/Editor.php2
-rw-r--r--core/modules/editor/tests/Drupal/editor/Tests/EditorConfigEntityUnitTest.php4
-rw-r--r--core/modules/entity/entity.module10
-rw-r--r--core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php2
-rw-r--r--core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php4
-rw-r--r--core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php12
-rw-r--r--core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php10
-rw-r--r--core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php10
-rw-r--r--core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php2
-rw-r--r--core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldType/ConfigurableEntityReferenceFieldItemList.php4
-rw-r--r--core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php2
-rw-r--r--core/modules/field/field.module2
-rw-r--r--core/modules/field/field.purge.inc6
-rw-r--r--core/modules/field/field.views.inc34
-rw-r--r--core/modules/field/lib/Drupal/field/Entity/FieldConfig.php44
-rw-r--r--core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php30
-rw-r--r--core/modules/field/lib/Drupal/field/FieldConfigStorage.php (renamed from core/modules/field/lib/Drupal/field/FieldConfigStorageController.php)14
-rw-r--r--core/modules/field/lib/Drupal/field/FieldInstanceConfigStorage.php (renamed from core/modules/field/lib/Drupal/field/FieldInstanceConfigStorageController.php)14
-rw-r--r--core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php8
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php8
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php2
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/FieldAttachStorageTest.php16
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/FieldInstanceCrudTest.php4
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php2
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/FormTest.php6
-rw-r--r--core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php6
-rw-r--r--core/modules/field/tests/Drupal/field/Tests/FieldInstanceConfigEntityUnitTest.php8
-rw-r--r--core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php2
-rw-r--r--core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php2
-rw-r--r--core/modules/field_ui/lib/Drupal/field_ui/FieldConfigListBuilder.php2
-rw-r--r--core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php8
-rw-r--r--core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php2
-rw-r--r--core/modules/file/file.api.php4
-rw-r--r--core/modules/file/file.module16
-rw-r--r--core/modules/file/file.views.inc4
-rw-r--r--core/modules/file/lib/Drupal/file/Entity/File.php14
-rw-r--r--core/modules/file/lib/Drupal/file/FileStorage.php (renamed from core/modules/file/lib/Drupal/file/FileStorageController.php)8
-rw-r--r--core/modules/file/lib/Drupal/file/FileStorageInterface.php (renamed from core/modules/file/lib/Drupal/file/FileStorageControllerInterface.php)6
-rw-r--r--core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileFieldItemList.php4
-rw-r--r--core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php2
-rw-r--r--core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php4
-rw-r--r--core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php2
-rw-r--r--core/modules/filter/filter.module2
-rw-r--r--core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php10
-rw-r--r--core/modules/filter/lib/Drupal/filter/FilterFormatListBuilder.php10
-rw-r--r--core/modules/forum/lib/Drupal/forum/Breadcrumb/ForumBreadcrumbBuilderBase.php2
-rw-r--r--core/modules/forum/lib/Drupal/forum/Controller/ForumController.php40
-rw-r--r--core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php2
-rw-r--r--core/modules/forum/lib/Drupal/forum/Form/Overview.php2
-rw-r--r--core/modules/forum/lib/Drupal/forum/ForumManager.php4
-rw-r--r--core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php2
-rw-r--r--core/modules/forum/lib/Drupal/forum/Tests/Views/ForumIntegrationTest.php6
-rw-r--r--core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php8
-rw-r--r--core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumListingBreadcrumbBuilderTest.php8
-rw-r--r--core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php8
-rw-r--r--core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php8
-rw-r--r--core/modules/hal/lib/Drupal/hal/Normalizer/ContentEntityNormalizer.php2
-rw-r--r--core/modules/hal/lib/Drupal/hal/Normalizer/FileEntityNormalizer.php2
-rw-r--r--core/modules/image/image.views.inc4
-rw-r--r--core/modules/image/lib/Drupal/image/Entity/ImageStyle.php10
-rw-r--r--core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php10
-rw-r--r--core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php14
-rw-r--r--core/modules/image/lib/Drupal/image/ImageStyleListBuilder.php10
-rw-r--r--core/modules/language/lib/Drupal/language/Entity/Language.php8
-rw-r--r--core/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php2
-rw-r--r--core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php8
-rw-r--r--core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php2
-rw-r--r--core/modules/menu/lib/Drupal/menu/Controller/MenuController.php2
-rw-r--r--core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php24
-rw-r--r--core/modules/menu/lib/Drupal/menu/MenuFormController.php14
-rw-r--r--core/modules/menu/menu.module2
-rw-r--r--core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php54
-rw-r--r--core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php18
-rw-r--r--core/modules/menu_link/lib/Drupal/menu_link/MenuLinkInterface.php2
-rw-r--r--core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php (renamed from core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php)12
-rw-r--r--core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageInterface.php (renamed from core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php)6
-rw-r--r--core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php6
-rw-r--r--core/modules/menu_link/menu_link.module4
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php4
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/MigrationStorage.php (renamed from core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php)8
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Entity.php24
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityComment.php12
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityContentBase.php14
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityFile.php8
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityRevision.php4
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityUser.php12
-rw-r--r--core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Migration.php14
-rw-r--r--core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorage.php (renamed from core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorageController.php)6
-rw-r--r--core/modules/migrate_drupal/migrate_drupal.module2
-rw-r--r--core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php4
-rw-r--r--core/modules/node/lib/Drupal/node/Controller/NodeController.php8
-rw-r--r--core/modules/node/lib/Drupal/node/Entity/Node.php18
-rw-r--r--core/modules/node/lib/Drupal/node/Entity/NodeType.php16
-rw-r--r--core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php8
-rw-r--r--core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php2
-rw-r--r--core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php16
-rw-r--r--core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php10
-rw-r--r--core/modules/node/lib/Drupal/node/NodeAccessController.php2
-rw-r--r--core/modules/node/lib/Drupal/node/NodeGrantDatabaseStorageInterface.php2
-rw-r--r--core/modules/node/lib/Drupal/node/NodeListBuilder.php10
-rw-r--r--core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php10
-rw-r--r--core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php6
-rw-r--r--core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php4
-rw-r--r--core/modules/node/lib/Drupal/node/Tests/Views/FrontPageTest.php18
-rw-r--r--core/modules/node/node.api.php6
-rw-r--r--core/modules/node/tests/Drupal/node/Tests/Plugin/views/field/NodeBulkFormTest.php6
-rw-r--r--core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php8
-rw-r--r--core/modules/rdf/tests/Drupal/rdf/Tests/RdfMappingConfigEntityUnitTest.php4
-rw-r--r--core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php2
-rw-r--r--core/modules/responsive_image/tests/Drupal/responsive_image/Tests/ResponsiveImageMappingEntityTest.php14
-rw-r--r--core/modules/search/lib/Drupal/search/Entity/SearchPage.php16
-rw-r--r--core/modules/search/lib/Drupal/search/SearchPageListBuilder.php10
-rw-r--r--core/modules/search/lib/Drupal/search/SearchPageRepository.php4
-rw-r--r--core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php2
-rw-r--r--core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php6
-rw-r--r--core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php2
-rw-r--r--core/modules/serialization/tests/Drupal/serialization/Tests/Normalizer/EntityNormalizerTest.php16
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutController.php2
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php2
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php10
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php18
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php16
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/ShortcutAccessController.php12
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorage.php (renamed from core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageController.php)8
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageInterface.php (renamed from core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageControllerInterface.php)6
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutSetsTest.php2
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php2
-rw-r--r--core/modules/shortcut/shortcut.module10
-rw-r--r--core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php2
-rw-r--r--core/modules/system/entity.api.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Controller/SystemController.php2
-rw-r--r--core/modules/system/lib/Drupal/system/DateFormatListBuilder.php10
-rw-r--r--core/modules/system/lib/Drupal/system/Entity/DateFormat.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Entity/Menu.php10
-rw-r--r--core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php14
-rw-r--r--core/modules/system/lib/Drupal/system/Form/ModulesListForm.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php10
-rw-r--r--core/modules/system/lib/Drupal/system/Plugin/views/field/BulkForm.php14
-rw-r--r--core/modules/system/lib/Drupal/system/SystemManager.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Datetime/DateTimePlusIntlTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/BundleConstraintValidatorTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php8
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregateTest.php21
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php6
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php8
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypeConstraintValidatorTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityUnitTestBase.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewBuilderTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php56
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php8
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Menu/LinksTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Menu/LocalTasksTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterRebuildTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php2
-rw-r--r--core/modules/system/system.api.php2
-rw-r--r--core/modules/system/system.module8
-rw-r--r--core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php2
-rw-r--r--core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php4
-rw-r--r--core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php8
-rw-r--r--core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Controller/FormTestController.php2
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php2
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TermAutocompleteController.php14
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php18
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php24
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php6
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php10
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceFieldItemList.php4
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Validation/Constraint/TermParentConstraintValidator.php2
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/TermName.php10
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php2
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php (renamed from core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php)12
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageInterface.php (renamed from core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageControllerInterface.php)6
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php4
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php6
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUnitTest.php2
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorage.php (renamed from core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php)6
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageInterface.php (renamed from core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageControllerInterface.php)6
-rw-r--r--core/modules/taxonomy/taxonomy.module14
-rw-r--r--core/modules/taxonomy/taxonomy.tokens.inc2
-rw-r--r--core/modules/taxonomy/taxonomy.views.inc4
-rw-r--r--core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php2
-rw-r--r--core/modules/tour/lib/Drupal/tour/Entity/Tour.php2
-rw-r--r--core/modules/user/lib/Drupal/user/Entity/Role.php24
-rw-r--r--core/modules/user/lib/Drupal/user/Entity/User.php30
-rw-r--r--core/modules/user/lib/Drupal/user/Form/UserLoginForm.php14
-rw-r--r--core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php14
-rw-r--r--core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php22
-rw-r--r--core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php10
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php2
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php10
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/views/argument/Uid.php20
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php6
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php10
-rw-r--r--core/modules/user/lib/Drupal/user/RoleStorage.php (renamed from core/modules/user/lib/Drupal/user/RoleStorageController.php)6
-rw-r--r--core/modules/user/lib/Drupal/user/RoleStorageInterface.php (renamed from core/modules/user/lib/Drupal/user/RoleStorageControllerInterface.php)8
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/UserEntityTest.php2
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php8
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php4
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/UserSaveTest.php2
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/Views/AccessRoleTest.php2
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/Views/AccessRoleUITest.php4
-rw-r--r--core/modules/user/lib/Drupal/user/Tests/Views/UserUnitTestBase.php32
-rw-r--r--core/modules/user/lib/Drupal/user/UserAuth.php8
-rw-r--r--core/modules/user/lib/Drupal/user/UserAutocomplete.php2
-rw-r--r--core/modules/user/lib/Drupal/user/UserListBuilder.php10
-rw-r--r--core/modules/user/lib/Drupal/user/UserStorage.php (renamed from core/modules/user/lib/Drupal/user/UserStorageController.php)12
-rw-r--r--core/modules/user/lib/Drupal/user/UserStorageInterface.php (renamed from core/modules/user/lib/Drupal/user/UserStorageControllerInterface.php)6
-rw-r--r--core/modules/user/tests/Drupal/user/Tests/Plugin/views/field/UserBulkFormTest.php6
-rw-r--r--core/modules/user/tests/Drupal/user/Tests/UserAuthTest.php10
-rw-r--r--core/modules/user/tests/Drupal/user/Tests/Views/Argument/RolesRidTest.php10
-rw-r--r--core/modules/user/user.api.php8
-rw-r--r--core/modules/user/user.module2
-rw-r--r--core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php20
-rw-r--r--core/modules/views/lib/Drupal/views/Entity/View.php22
-rw-r--r--core/modules/views/lib/Drupal/views/EventSubscriber/RouteSubscriber.php12
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php12
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php20
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php20
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/area/View.php14
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Entity.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php10
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Routing/ViewPageController.php20
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Handler/AreaEntityTest.php4
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/ModuleTest.php6
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/CacheTagTest.php8
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/QueryGroupByTest.php24
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php12
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/ViewTestData.php5
-rw-r--r--core/modules/views/lib/Drupal/views/Views.php10
-rw-r--r--core/modules/views/tests/Drupal/views/Tests/Controller/ViewAjaxControllerTest.php4
-rw-r--r--core/modules/views/tests/Drupal/views/Tests/EventSubscriber/RouteSubscriberTest.php14
-rw-r--r--core/modules/views/tests/Drupal/views/Tests/Plugin/Block/ViewsBlockTest.php14
-rw-r--r--core/modules/views/tests/Drupal/views/Tests/Plugin/argument_validator/EntityTest.php8
-rw-r--r--core/modules/views/tests/Drupal/views/Tests/Routing/ViewPageControllerTest.php18
-rw-r--r--core/modules/views/tests/Drupal/views/Tests/ViewsTest.php8
-rw-r--r--core/modules/views/views.views.inc2
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php4
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php2
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php2
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php6
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php6
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/ViewListBuilder.php10
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php22
-rw-r--r--core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListBuilderTest.php4
-rw-r--r--core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php2
-rw-r--r--core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php2
-rw-r--r--core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php8
-rw-r--r--core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php22
-rw-r--r--core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseEntityStorageTest.php (renamed from core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseStorageControllerTest.php)16
-rw-r--r--core/tests/Drupal/Tests/Core/Session/UserSessionTest.php4
392 files changed, 1661 insertions, 1664 deletions
diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 761e386..d658bb7 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -69,11 +69,11 @@ function entity_get_bundles($entity_type = NULL) {
function entity_invoke_bundle_hook($hook, $entity_type, $bundle, $bundle_new = NULL) {
entity_info_cache_clear();
- // Notify the entity storage controller.
+ // Notify the entity storage.
$method = 'onBundle' . ucfirst($hook);
- $storage_controller = \Drupal::entityManager()->getStorageController($entity_type);
- if (method_exists($storage_controller, $method)) {
- $storage_controller->$method($bundle, $bundle_new);
+ $storage = \Drupal::entityManager()->getStorage($entity_type);
+ if (method_exists($storage, $method)) {
+ $storage->$method($bundle, $bundle_new);
}
// Invoke hook_entity_bundle_*() hooks.
\Drupal::moduleHandler()->invokeAll('entity_bundle_' . $hook, array($entity_type, $bundle, $bundle_new));
@@ -137,12 +137,12 @@ function entity_get_view_modes($entity_type_id = NULL) {
* The entity object, or NULL if there is no entity with the given id.
*
* @see \Drupal\Core\Entity\EntityManagerInterface
- * @see \Drupal\Core\Entity\EntityStorageControllerInterface
- * @see \Drupal\Core\Entity\DatabaseStorageController
+ * @see \Drupal\Core\Entity\EntityStorageInterface
+ * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage
* @see \Drupal\Core\Entity\Query\QueryInterface
*/
function entity_load($entity_type, $id, $reset = FALSE) {
- $controller = \Drupal::entityManager()->getStorageController($entity_type);
+ $controller = \Drupal::entityManager()->getStorage($entity_type);
if ($reset) {
$controller->resetCache(array($id));
}
@@ -162,12 +162,12 @@ function entity_load($entity_type, $id, $reset = FALSE) {
* id.
*
* @see \Drupal\Core\Entity\EntityManagerInterface
- * @see \Drupal\Core\Entity\EntityStorageControllerInterface
- * @see \Drupal\Core\Entity\DatabaseStorageController
+ * @see \Drupal\Core\Entity\EntityStorageInterface
+ * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage
*/
function entity_revision_load($entity_type, $revision_id) {
return \Drupal::entityManager()
- ->getStorageController($entity_type)
+ ->getStorage($entity_type)
->loadRevision($revision_id);
}
@@ -181,7 +181,7 @@ function entity_revision_load($entity_type, $revision_id) {
*/
function entity_revision_delete($entity_type, $revision_id) {
\Drupal::entityManager()
- ->getStorageController($entity_type)
+ ->getStorage($entity_type)
->deleteRevision($revision_id);
}
@@ -212,7 +212,7 @@ function entity_load_by_uuid($entity_type_id, $uuid, $reset = FALSE) {
throw new EntityStorageException("Entity type $entity_type_id does not support UUIDs.");
}
- $controller = \Drupal::entityManager()->getStorageController($entity_type_id);
+ $controller = \Drupal::entityManager()->getStorage($entity_type_id);
if ($reset) {
$controller->resetCache();
}
@@ -228,14 +228,15 @@ function entity_load_by_uuid($entity_type_id, $uuid, $reset = FALSE) {
* database access if loaded again during the same page request.
*
* The actual loading is done through a class that has to implement the
- * Drupal\Core\Entity\EntityStorageControllerInterface interface. By default,
- * Drupal\Core\Entity\DatabaseStorageController is used. Entity types can
- * specify that a different class should be used by setting the
+ * Drupal\Core\Entity\EntityStorageInterface interface. By default,
+ * Drupal\Core\Entity\ContentEntityDatabaseStorage is used for content entities
+ * and Drupal\Core\Config\Entity\ConfigEntityStorage for config entities. Entity
+ * types can specify that a different class should be used by setting the
* "controllers['storage']" key in the entity plugin annotation. These classes
- * can either implement the Drupal\Core\Entity\EntityStorageControllerInterface
+ * can either implement the Drupal\Core\Entity\EntityStorageInterface
* interface, or, most commonly, extend the
- * Drupal\Core\Entity\DatabaseStorageController class.
- * See Drupal\node\Entity\Node and Drupal\node\NodeStorageController
+ * Drupal\Core\Entity\ContentEntityDatabaseStorage class.
+ * See Drupal\node\Entity\Node and Drupal\node\NodeStorage
* for an example.
*
* @param string $entity_type
@@ -249,12 +250,12 @@ function entity_load_by_uuid($entity_type_id, $uuid, $reset = FALSE) {
* An array of entity objects indexed by their ids.
*
* @see \Drupal\Core\Entity\EntityManagerInterface
- * @see \Drupal\Core\Entity\EntityStorageControllerInterface
- * @see \Drupal\Core\Entity\DatabaseStorageController
+ * @see \Drupal\Core\Entity\EntityStorageInterface
+ * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage
* @see \Drupal\Core\Entity\Query\QueryInterface
*/
function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) {
- $controller = \Drupal::entityManager()->getStorageController($entity_type);
+ $controller = \Drupal::entityManager()->getStorage($entity_type);
if ($reset) {
$controller->resetCache($ids);
}
@@ -275,7 +276,7 @@ function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) {
*/
function entity_load_multiple_by_properties($entity_type, array $values) {
return \Drupal::entityManager()
- ->getStorageController($entity_type)
+ ->getStorage($entity_type)
->loadByProperties($values);
}
@@ -297,7 +298,7 @@ function entity_load_multiple_by_properties($entity_type, array $values) {
*/
function entity_load_unchanged($entity_type, $id) {
return \Drupal::entityManager()
- ->getStorageController($entity_type)
+ ->getStorage($entity_type)
->loadUnchanged($id);
}
@@ -310,7 +311,7 @@ function entity_load_unchanged($entity_type, $id) {
* An array of entity IDs of the entities to delete.
*/
function entity_delete_multiple($entity_type, array $ids) {
- $controller = \Drupal::entityManager()->getStorageController($entity_type);
+ $controller = \Drupal::entityManager()->getStorage($entity_type);
$entities = $controller->loadMultiple($ids);
$controller->delete($entities);
}
@@ -329,23 +330,23 @@ function entity_delete_multiple($entity_type, array $ids) {
*/
function entity_create($entity_type, array $values = array()) {
return \Drupal::entityManager()
- ->getStorageController($entity_type)
+ ->getStorage($entity_type)
->create($values);
}
/**
* Gets the entity controller class for an entity type.
*
- * @return \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @return \Drupal\Core\Entity\EntityStorageInterface
*
- * @see \Drupal\Core\Entity\EntityManagerInterface::getStorageController().
+ * @see \Drupal\Core\Entity\EntityManagerInterface::getStorage()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- * Use \Drupal::entityManager()->getStorageController().
+ * Use \Drupal::entityManager()->getStorage().
*/
function entity_get_controller($entity_type) {
return \Drupal::entityManager()
- ->getStorageController($entity_type);
+ ->getStorage($entity_type);
}
/**
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 987d9d0..a0ca6d7 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -211,7 +211,7 @@ const MENU_SITE_ONLINE = 5;
/**
* The maximum depth of a menu links tree - matches the number of p columns.
*
- * @todo Move this constant to MenuLinkStorageController along with all the tree
+ * @todo Move this constant to MenuLinkStorage along with all the tree
* functionality.
*/
const MENU_MAX_DEPTH = 9;
@@ -964,7 +964,7 @@ function menu_cache_clear_all() {
*/
function menu_reset_static_cache() {
\Drupal::entityManager()
- ->getStorageController('menu_link')->resetCache();
+ ->getStorage('menu_link')->resetCache();
drupal_static_reset('_menu_build_tree');
drupal_static_reset('menu_tree');
drupal_static_reset('menu_tree_all_data');
@@ -1028,9 +1028,9 @@ function menu_link_rebuild_defaults() {
// when possible.
return;
}
- /** @var \Drupal\menu_link\MenuLinkStorageControllerInterface $menu_link_storage */
+ /** @var \Drupal\menu_link\MenuLinkStorageInterface $menu_link_storage */
$menu_link_storage = \Drupal::entityManager()
- ->getStorageController('menu_link');
+ ->getStorage('menu_link');
$links = array();
$children = array();
$top_links = array();
diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php
index 24d5e71..5e11697 100644
--- a/core/lib/Drupal/Core/Config/ConfigImporter.php
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php
@@ -281,7 +281,7 @@ class ConfigImporter extends DependencySerialization {
}
/**
- * Invokes import* methods on configuration entity storage controllers.
+ * Invokes import* methods on configuration entity storage.
*
* Allow modules to take over configuration change operations for higher-level
* configuration data.
@@ -318,9 +318,9 @@ class ConfigImporter extends DependencySerialization {
}
$method = 'import' . ucfirst($op);
- $entity_storage = $this->configManager->getEntityManager()->getStorageController($entity_type);
- // Call to the configuration entity's storage controller to handle the
- // configuration change.
+ $entity_storage = $this->configManager->getEntityManager()->getStorage($entity_type);
+ // Call to the configuration entity's storage to handle the configuration
+ // change.
if (!($entity_storage instanceof ImportableEntityStorageInterface)) {
throw new EntityStorageException(String::format('The entity storage "@storage" for the "@entity_type" entity type does not support imports', array('@storage' => get_class($entity_storage), '@entity_type' => $entity_type)));
}
diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php
index b039b8f..3769a7b 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstaller.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php
@@ -127,7 +127,7 @@ class ConfigInstaller implements ConfigInstallerInterface {
if ($entity_type = $this->configManager->getEntityTypeIdByName($name)) {
$entity_storage = $this->configManager
->getEntityManager()
- ->getStorageController($entity_type);
+ ->getStorage($entity_type);
// It is possible that secondary writes can occur during configuration
// creation. Updates of such configuration are allowed.
if ($this->activeStorage->exists($name)) {
diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php
index 418b912..d1048ea 100644
--- a/core/lib/Drupal/Core/Config/ConfigManager.php
+++ b/core/lib/Drupal/Core/Config/ConfigManager.php
@@ -188,7 +188,7 @@ class ConfigManager implements ConfigManagerInterface {
$definitions = $this->entityManager->getDefinitions();
foreach ($dependencies as $config_name => $dependency) {
// Group by entity type to efficient load entities using
- // \Drupal\Core\Entity\EntityStorageControllerInterface::loadMultiple().
+ // \Drupal\Core\Entity\EntityStorageInterface::loadMultiple().
$entity_type_id = $this->getEntityTypeIdByName($config_name);
// It is possible that a non-configuration entity will be returned if a
// simple configuration object has a UUID key. This would occur if the
@@ -201,10 +201,10 @@ class ConfigManager implements ConfigManagerInterface {
}
$entities_to_return = array();
foreach ($entities as $entity_type_id => $entities_to_load) {
- $storage_controller = $this->entityManager->getStorageController($entity_type_id);
+ $storage = $this->entityManager->getStorage($entity_type_id);
// Remove the keys since there are potential ID clashes from different
// configuration entity types.
- $entities_to_return = array_merge($entities_to_return, array_values($storage_controller->loadMultiple($entities_to_load)));
+ $entities_to_return = array_merge($entities_to_return, array_values($storage->loadMultiple($entities_to_load)));
}
return $entities_to_return;
}
diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php
index c43145a..fd8f2ee 100644
--- a/core/lib/Drupal/Core/Config/DatabaseStorage.php
+++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php
@@ -11,7 +11,7 @@ use Drupal\Core\Database\Database;
use Drupal\Core\Database\Connection;
/**
- * Defines the Database storage controller.
+ * Defines the Database storage.
*/
class DatabaseStorage implements StorageInterface {
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
index f69a52b..e5d943c 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
@@ -10,7 +10,7 @@ namespace Drupal\Core\Config\Entity;
use Drupal\Component\Utility\String;
use Drupal\Core\Entity\Entity;
use Drupal\Core\Config\ConfigDuplicateUUIDException;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Language\Language;
/**
@@ -256,8 +256,8 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
// @todo When \Drupal\Core\Config\Entity\EntityWithPluginBagInterface moves
// to a trait, switch to class_uses() instead.
@@ -270,7 +270,7 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface
// Ensure this entity's UUID does not exist with a different ID, regardless
// of whether it's new or updated.
- $matching_entities = $storage_controller->getQuery()
+ $matching_entities = $storage->getQuery()
->condition('uuid', $this->uuid())
->execute();
$matched_entity = reset($matching_entities);
@@ -279,7 +279,7 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface
}
if (!$this->isNew()) {
- $original = $storage_controller->loadUnchanged($this->id());
+ $original = $storage->loadUnchanged($this->id());
// Ensure that the UUID cannot be changed for an existing entity.
if ($original && ($original->uuid() != $this->uuid())) {
throw new ConfigDuplicateUUIDException(String::format('Attempt to save a configuration entity %id with UUID %uuid when this entity already exists with UUID %original_uuid', array('%id' => $this->id(), '%uuid' => $this->uuid(), '%original_uuid' => $original->uuid())));
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
index 730aaa2..4656897 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
@@ -2,7 +2,7 @@
/**
* @file
- * Definition of Drupal\Core\Config\Entity\ConfigStorageController.
+ * Definition of Drupal\Core\Config\Entity\ConfigEntityStorage.
*/
namespace Drupal\Core\Config\Entity;
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\String;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityMalformedException;
-use Drupal\Core\Entity\EntityStorageControllerBase;
+use Drupal\Core\Entity\EntityStorageBase;
use Drupal\Core\Config\Config;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
@@ -21,7 +21,7 @@ use Drupal\Component\Uuid\UuidInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
- * Defines the storage controller class for configuration entities.
+ * Defines the storage class for configuration entities.
*
* Configuration object names of configuration entities are comprised of two
* parts, separated by a dot:
@@ -35,7 +35,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* after the config_prefix in a config name forms the entity ID. Additional or
* custom suffixes are not possible.
*/
-class ConfigStorageController extends EntityStorageControllerBase implements ConfigStorageControllerInterface, ImportableEntityStorageInterface {
+class ConfigEntityStorage extends EntityStorageBase implements ConfigEntityStorageInterface, ImportableEntityStorageInterface {
/**
* The UUID service.
@@ -66,7 +66,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
protected $configStorage;
/**
- * Constructs a ConfigStorageController object.
+ * Constructs a ConfigEntityStorage object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
@@ -148,14 +148,14 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
}
/**
- * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision().
+ * Implements Drupal\Core\Entity\EntityStorageInterface::loadRevision().
*/
public function loadRevision($revision_id) {
return FALSE;
}
/**
- * Implements Drupal\Core\Entity\EntityStorageControllerInterface::deleteRevision().
+ * Implements Drupal\Core\Entity\EntityStorageInterface::deleteRevision().
*/
public function deleteRevision($revision_id) {
return NULL;
@@ -184,8 +184,8 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
* being loaded needs to be augmented with additional data from another
* table, such as loading node type into comments or vocabulary machine name
* into terms, however it can also support $conditions on different tables.
- * See Drupal\comment\CommentStorageController::buildQuery() or
- * Drupal\taxonomy\TermStorageController::buildQuery() for examples.
+ * See Drupal\comment\CommentStorage::buildQuery() or
+ * Drupal\taxonomy\TermStorage::buildQuery() for examples.
*
* @param $ids
* An array of entity IDs, or NULL to load all entities.
@@ -221,7 +221,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
}
/**
- * Implements Drupal\Core\Entity\EntityStorageControllerInterface::create().
+ * Implements Drupal\Core\Entity\EntityStorageInterface::create().
*/
public function create(array $values = array()) {
$class = $this->entityType->getClass();
@@ -254,7 +254,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
}
/**
- * Implements Drupal\Core\Entity\EntityStorageControllerInterface::delete().
+ * Implements Drupal\Core\Entity\EntityStorageInterface::delete().
*/
public function delete(array $entities) {
if (!$entities) {
@@ -280,7 +280,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
}
/**
- * Implements Drupal\Core\Entity\EntityStorageControllerInterface::save().
+ * Implements Drupal\Core\Entity\EntityStorageInterface::save().
*
* @throws EntityMalformedException
* When attempting to save a configuration entity that has no ID.
@@ -369,7 +369,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
}
/**
- * Implements Drupal\Core\Entity\EntityStorageControllerInterface::getQueryServicename().
+ * Implements Drupal\Core\Entity\EntityStorageInterface::getQueryServicename().
*/
public function getQueryServicename() {
return 'entity.query.config';
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php
index e479b7f..5efa615 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains \Drupal\Core\Config\Entity\ConfigStorageControllerInterface.
+ * Contains \Drupal\Core\Config\Entity\ConfigEntityStorageInterface.
*/
namespace Drupal\Core\Config\Entity;
use Drupal\Core\Config\Config;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Provides an interface for configuration entity storage.
*/
-interface ConfigStorageControllerInterface extends EntityStorageControllerInterface {
+interface ConfigEntityStorageInterface extends EntityStorageInterface {
/**
* Returns the config prefix used by the configuration entity type.
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php
index 9a61693..061c2e7 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php
@@ -26,7 +26,7 @@ class ConfigEntityType extends EntityType {
*/
public function getControllerClasses() {
return parent::getControllerClasses() + array(
- 'storage' => 'Drupal\Core\Config\Entity\ConfigStorageController',
+ 'storage' => 'Drupal\Core\Config\Entity\ConfigEntityStorage',
);
}
diff --git a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
index cb68a0e..3729f2d 100644
--- a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
+++ b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
@@ -8,7 +8,7 @@
namespace Drupal\Core\Config\Entity;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Form\FormInterface;
@@ -48,7 +48,7 @@ abstract class DraggableListBuilder extends ConfigEntityListBuilder implements F
/**
* {@inheritdoc}
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage) {
parent::__construct($entity_type, $storage);
// Check if the entity type supports weighting.
diff --git a/core/lib/Drupal/Core/Datetime/Date.php b/core/lib/Drupal/Core/Datetime/Date.php
index c908ca8..898a49e 100644
--- a/core/lib/Drupal/Core/Datetime/Date.php
+++ b/core/lib/Drupal/Core/Datetime/Date.php
@@ -30,7 +30,7 @@ class Date {
/**
* The date format storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $dateFormatStorage;
@@ -83,7 +83,7 @@ class Date {
* The configuration factory.
*/
public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, TranslationInterface $translation, ConfigFactoryInterface $config_factory) {
- $this->dateFormatStorage = $entity_manager->getStorageController('date_format');
+ $this->dateFormatStorage = $entity_manager->getStorage('date_format');
$this->languageManager = $language_manager;
$this->stringTranslation = $translation;
$this->configFactory = $config_factory;
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index c6ff65c..0b2362a 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -211,7 +211,7 @@ abstract class ContentEntityBase extends Entity implements \IteratorAggregate, C
/**
* {@inheritdoc}
*/
- public function preSaveRevision(EntityStorageControllerInterface $storage_controller, \stdClass $record) {
+ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
}
/**
@@ -695,7 +695,7 @@ abstract class ContentEntityBase extends Entity implements \IteratorAggregate, C
$entity_type = $this->getEntityType();
$default_values = array($entity_type->getKey('bundle') => $this->bundle, 'langcode' => $langcode);
$entity = $this->entityManager()
- ->getStorageController($this->getEntityTypeId())
+ ->getStorage($this->getEntityTypeId())
->create($default_values);
foreach ($entity as $name => $field) {
diff --git a/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
index 31b1613..6b7de03 100644
--- a/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\DatabaseStorageController.
+ * Contains \Drupal\Core\Entity\ContentEntityDatabaseStorage.
*/
namespace Drupal\Core\Entity;
@@ -20,12 +20,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Defines a base entity controller class.
*
- * Default implementation of Drupal\Core\Entity\EntityStorageControllerInterface.
+ * Default implementation of Drupal\Core\Entity\EntityStorageInterface.
*
* This class can be used as-is by most simple entity types. Entity types
* requiring special handling can extend the class.
*/
-class FieldableDatabaseStorageController extends FieldableEntityStorageControllerBase {
+class ContentEntityDatabaseStorage extends ContentEntityStorageBase {
/**
* Name of entity's revision database table field, if it supports revisions.
@@ -90,7 +90,7 @@ class FieldableDatabaseStorageController extends FieldableEntityStorageControlle
}
/**
- * Constructs a DatabaseStorageController object.
+ * Constructs a ContentEntityDatabaseStorage object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
@@ -313,7 +313,7 @@ class FieldableDatabaseStorageController extends FieldableEntityStorageControlle
}
/**
- * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision().
+ * Implements \Drupal\Core\Entity\EntityStorageInterface::loadRevision().
*/
public function loadRevision($revision_id) {
// Build and execute the query.
@@ -330,7 +330,7 @@ class FieldableDatabaseStorageController extends FieldableEntityStorageControlle
}
/**
- * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::deleteRevision().
+ * Implements \Drupal\Core\Entity\EntityStorageInterface::deleteRevision().
*/
public function deleteRevision($revision_id) {
if ($revision = $this->loadRevision($revision_id)) {
@@ -379,7 +379,7 @@ class FieldableDatabaseStorageController extends FieldableEntityStorageControlle
* being loaded needs to be augmented with additional data from another
* table, such as loading node type into comments or vocabulary machine name
* into terms, however it can also support $conditions on different tables.
- * See Drupal\comment\CommentStorageController::buildQuery() for an example.
+ * See Drupal\comment\CommentStorage::buildQuery() for an example.
*
* @param array|null $ids
* An array of entity IDs, or NULL to load all entities.
@@ -445,7 +445,7 @@ class FieldableDatabaseStorageController extends FieldableEntityStorageControlle
* hook_node_load() or hook_user_load(). If your hook_TYPE_load()
* expects special parameters apart from the queried entities, you can set
* $this->hookLoadArguments prior to calling the method.
- * See Drupal\node\NodeStorageController::attachLoad() for an example.
+ * See Drupal\node\NodeStorage::attachLoad() for an example.
*
* @param $queried_entities
* Associative array of query results, keyed on the entity ID.
@@ -463,7 +463,7 @@ class FieldableDatabaseStorageController extends FieldableEntityStorageControlle
}
/**
- * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::delete().
+ * Implements \Drupal\Core\Entity\EntityStorageInterface::delete().
*/
public function delete(array $entities) {
if (!$entities) {
diff --git a/core/lib/Drupal/Core/Entity/FieldableNullStorageController.php b/core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php
index fd6c6d3..3a7e7e5 100644
--- a/core/lib/Drupal/Core/Entity/FieldableNullStorageController.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\FieldableNullStorageController.
+ * Contains \Drupal\Core\Entity\FieldableNullStorage.
*/
namespace Drupal\Core\Entity;
@@ -11,11 +11,11 @@ use Drupal\Core\Entity\Query\QueryException;
use Drupal\field\FieldInstanceConfigInterface;
/**
- * Defines a null entity controller class.
+ * Defines a null entity storage.
*
* Used for content entity types that have no storage.
*/
-class FieldableNullStorageController extends FieldableEntityStorageControllerBase {
+class ContentEntityNullStorage extends ContentEntityStorageBase {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
index f1e050f..0c2bfe4 100644
--- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\FieldableEntityStorageControllerBase.
+ * Contains \Drupal\Core\Entity\ContentEntityStorageBase.
*/
namespace Drupal\Core\Entity;
@@ -13,7 +13,7 @@ use Drupal\field\FieldConfigInterface;
use Drupal\field\FieldInstanceConfigInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
-abstract class FieldableEntityStorageControllerBase extends EntityStorageControllerBase implements FieldableEntityStorageControllerInterface {
+abstract class ContentEntityStorageBase extends EntityStorageBase implements FieldableEntityStorageInterface {
/**
* The entity bundle key.
@@ -30,7 +30,7 @@ abstract class FieldableEntityStorageControllerBase extends EntityStorageControl
protected $entityClass;
/**
- * Constructs a FieldableEntityStorageControllerBase object.
+ * Constructs a ContentEntityStorageBase object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
@@ -154,7 +154,7 @@ abstract class FieldableEntityStorageControllerBase extends EntityStorageControl
// Fetch other entities from their storage location.
if ($queried_entities) {
- // Let the storage controller actually load the values.
+ // Let the storage actually load the values.
$this->doLoadFieldItems($queried_entities, $age);
// Build cache data.
@@ -252,9 +252,9 @@ abstract class FieldableEntityStorageControllerBase extends EntityStorageControl
* @param array $entities
* An array of entities keyed by entity ID.
* @param int $age
- * EntityStorageControllerInterface::FIELD_LOAD_CURRENT to load the most
+ * EntityStorageInterface::FIELD_LOAD_CURRENT to load the most
* recent revision for all fields, or
- * EntityStorageControllerInterface::FIELD_LOAD_REVISION to load the version
+ * EntityStorageInterface::FIELD_LOAD_REVISION to load the version
* indicated by each entity.
*/
abstract protected function doLoadFieldItems($entities, $age);
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityType.php b/core/lib/Drupal/Core/Entity/ContentEntityType.php
index 14f7ee2..510182c 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityType.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityType.php
@@ -17,7 +17,7 @@ class ContentEntityType extends EntityType {
*/
public function getControllerClasses() {
return parent::getControllerClasses() + array(
- 'storage' => 'Drupal\Core\Entity\FieldableDatabaseStorageController',
+ 'storage' => 'Drupal\Core\Entity\ContentEntityDatabaseStorage',
);
}
diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php
index e76a7d0..e56bb65 100644
--- a/core/lib/Drupal/Core/Entity/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Entity.php
@@ -295,7 +295,7 @@ abstract class Entity extends DependencySerialization implements EntityInterface
* {@inheritdoc}
*/
public function save() {
- return $this->entityManager()->getStorageController($this->entityTypeId)->save($this);
+ return $this->entityManager()->getStorage($this->entityTypeId)->save($this);
}
/**
@@ -303,7 +303,7 @@ abstract class Entity extends DependencySerialization implements EntityInterface
*/
public function delete() {
if (!$this->isNew()) {
- $this->entityManager()->getStorageController($this->entityTypeId)->delete(array($this->id() => $this));
+ $this->entityManager()->getStorage($this->entityTypeId)->delete(array($this->id() => $this));
}
}
@@ -332,13 +332,13 @@ abstract class Entity extends DependencySerialization implements EntityInterface
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
+ public function preSave(EntityStorageInterface $storage) {
}
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
$this->onSaveOrDelete();
if ($update) {
$this->onUpdateBundleEntity();
@@ -348,25 +348,25 @@ abstract class Entity extends DependencySerialization implements EntityInterface
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
}
/**
* {@inheritdoc}
*/
- public function postCreate(EntityStorageControllerInterface $storage_controller) {
+ public function postCreate(EntityStorageInterface $storage) {
}
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
}
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
foreach ($entities as $entity) {
$entity->onSaveOrDelete();
}
@@ -375,7 +375,7 @@ abstract class Entity extends DependencySerialization implements EntityInterface
/**
* {@inheritdoc}
*/
- public static function postLoad(EntityStorageControllerInterface $storage_controller, array &$entities) {
+ public static function postLoad(EntityStorageInterface $storage, array &$entities) {
}
/**
diff --git a/core/lib/Drupal/Core/Entity/EntityControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityControllerInterface.php
index a9bf653..0259e81 100644
--- a/core/lib/Drupal/Core/Entity/EntityControllerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityControllerInterface.php
@@ -7,7 +7,7 @@
namespace Drupal\Core\Entity;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/EntityDatabaseStorage.php
index 2db9db5..c25ff56 100644
--- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
+++ b/core/lib/Drupal/Core/Entity/EntityDatabaseStorage.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\DatabaseStorageController.
+ * Contains \Drupal\Core\Entity\EntityDatabaseStorage.
*/
namespace Drupal\Core\Entity;
@@ -26,7 +26,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* This class only supports bare, non-content entities.
*/
-class DatabaseStorageController extends EntityStorageControllerBase {
+class EntityDatabaseStorage extends EntityStorageBase {
/**
* The UUID service.
@@ -68,7 +68,7 @@ class DatabaseStorageController extends EntityStorageControllerBase {
}
/**
- * Constructs a DatabaseStorageController object.
+ * Constructs a EntityDatabaseStorage object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
@@ -169,14 +169,14 @@ class DatabaseStorageController extends EntityStorageControllerBase {
* {@inheritdoc}
*/
public function loadRevision($revision_id) {
- throw new \Exception('Database storage controller does not support revisions.');
+ throw new \Exception('Database storage does not support revisions.');
}
/**
* {@inheritdoc}
*/
public function deleteRevision($revision_id) {
- throw new \Exception('Database storage controller does not support revisions.');
+ throw new \Exception('Database storage does not support revisions.');
}
/**
diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index d083aa5..e2a5b64 100644
--- a/core/lib/Drupal/Core/Entity/EntityInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -201,10 +201,10 @@ interface EntityInterface extends AccessibleInterface {
*
* Used before the entity is saved and before invoking the presave hook.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage object.
*/
- public function preSave(EntityStorageControllerInterface $storage_controller);
+ public function preSave(EntityStorageInterface $storage);
/**
* Acts on a saved entity before the insert or update hook is invoked.
@@ -212,67 +212,67 @@ interface EntityInterface extends AccessibleInterface {
* Used after the entity is saved, but before invoking the insert or update
* hook.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage object.
* @param bool $update
* TRUE if the entity has been updated, or FALSE if it has been inserted.
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE);
/**
* Changes the values of an entity before it is created.
*
* Load defaults for example.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage object.
* @param array $values
* An array of values to set, keyed by property name. If the entity type has
* bundles the bundle key has to be specified.
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values);
+ public static function preCreate(EntityStorageInterface $storage, array &$values);
/**
* Acts on an entity after it is created but before hooks are invoked.
*
- * @param EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param EntityStorageInterface $storage
+ * The entity storage object.
*/
- public function postCreate(EntityStorageControllerInterface $storage_controller);
+ public function postCreate(EntityStorageInterface $storage);
/**
* Acts on entities before they are deleted and before hooks are invoked.
*
* Used before the entities are deleted and before invoking the delete hook.
*
- * @param EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param EntityStorageInterface $storage
+ * The entity storage object.
* @param \Drupal\Core\Entity\EntityInterface[] $entities
* An array of entities.
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities);
/**
* Acts on deleted entities before the delete hook is invoked.
*
* Used after the entities are deleted but before invoking the delete hook.
*
- * @param EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param EntityStorageInterface $storage
+ * The entity storage object.
* @param \Drupal\Core\Entity\EntityInterface[] $entities
* An array of entities.
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities);
/**
* Acts on loaded entities.
*
- * @param EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param EntityStorageInterface $storage
+ * The entity storage object.
* @param \Drupal\Core\Entity\EntityInterface[] $entities
* An array of entities.
*/
- public static function postLoad(EntityStorageControllerInterface $storage_controller, array &$entities);
+ public static function postLoad(EntityStorageInterface $storage, array &$entities);
/**
* Creates a duplicate of the entity.
diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
index 626c275..5362092 100644
--- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
@@ -18,9 +18,9 @@ use Drupal\Component\Utility\String;
class EntityListBuilder extends EntityControllerBase implements EntityListBuilderInterface, EntityControllerInterface {
/**
- * The entity storage controller class.
+ * The entity storage class.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $storage;
@@ -44,7 +44,7 @@ class EntityListBuilder extends EntityControllerBase implements EntityListBuilde
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id())
+ $container->get('entity.manager')->getStorage($entity_type->id())
);
}
@@ -53,10 +53,10 @@ class EntityListBuilder extends EntityControllerBase implements EntityListBuilde
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage) {
$this->entityTypeId = $entity_type->id();
$this->storage = $storage;
$this->entityType = $entity_type;
@@ -65,7 +65,7 @@ class EntityListBuilder extends EntityControllerBase implements EntityListBuilde
/**
* {@inheritdoc}
*/
- public function getStorageController() {
+ public function getStorage() {
return $this->storage;
}
diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php b/core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php
index 99f5935..fce074c 100644
--- a/core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php
@@ -13,12 +13,12 @@ namespace Drupal\Core\Entity;
interface EntityListBuilderInterface {
/**
- * Gets the entity storage controller.
+ * Gets the entity storage.
*
- * @return \Drupal\Core\Entity\EntityStorageControllerInterface
- * The storage controller used by this list builder.
+ * @return \Drupal\Core\Entity\EntityStorageInterface
+ * The storage used by this list builder.
*/
- public function getStorageController();
+ public function getStorage();
/**
* Loads entities of this type from storage for listing.
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 5300dc8..adb402b 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -192,7 +192,7 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface
/**
* {@inheritdoc}
*/
- public function getStorageController($entity_type) {
+ public function getStorage($entity_type) {
return $this->getController($entity_type, 'storage', 'getStorageClass');
}
@@ -608,7 +608,7 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface
}
else {
$this->displayModeInfo[$display_type] = array();
- foreach ($this->getStorageController($display_type)->loadMultiple() as $display_mode) {
+ foreach ($this->getStorage($display_type)->loadMultiple() as $display_mode) {
list($display_mode_entity_type, $display_mode_name) = explode('.', $display_mode->id(), 2);
$this->displayModeInfo[$display_type][$display_mode_entity_type][$display_mode_name] = (array) $display_mode;
}
diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
index bb8e0d9..424af7d 100644
--- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
@@ -84,15 +84,15 @@ interface EntityManagerInterface extends PluginManagerInterface {
public function getAdminRouteInfo($entity_type_id, $bundle);
/**
- * Creates a new storage controller instance.
+ * Creates a new storage instance.
*
* @param string $entity_type
- * The entity type for this storage controller.
+ * The entity type for this storage.
*
- * @return \Drupal\Core\Entity\EntityStorageControllerInterface
- * A storage controller instance.
+ * @return \Drupal\Core\Entity\EntityStorageInterface
+ * A storage instance.
*/
- public function getStorageController($entity_type);
+ public function getStorage($entity_type);
/**
* Get the bundle info of all entity types.
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
index 7c39f19..1befefc 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\EntityStorageControllerBase.
+ * Contains \Drupal\Core\Entity\EntityStorageBase.
*/
namespace Drupal\Core\Entity;
@@ -11,9 +11,9 @@ use Drupal\Core\Extension\ModuleHandlerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
- * A base entity storage controller class.
+ * A base entity storage class.
*/
-abstract class EntityStorageControllerBase extends EntityControllerBase implements EntityStorageControllerInterface, EntityControllerInterface {
+abstract class EntityStorageBase extends EntityControllerBase implements EntityStorageInterface, EntityControllerInterface {
/**
* Static cache of entities.
@@ -60,7 +60,7 @@ abstract class EntityStorageControllerBase extends EntityControllerBase implemen
protected $uuidKey;
/**
- * Constructs an EntityStorageControllerBase instance.
+ * Constructs an EntityStorageBase instance.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
index 2658aa2..0406a5e 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
@@ -2,23 +2,23 @@
/**
* @file
- * Contains \Drupal\Core\Entity\EntityStorageControllerInterface.
+ * Contains \Drupal\Core\Entity\EntityStorageInterface.
*/
namespace Drupal\Core\Entity;
/**
- * Defines a common interface for entity controller classes.
+ * Defines a common interface for entity storage classes.
*
* All entity controller classes specified via the "controllers['storage']" key
* returned by \Drupal\Core\Entity\EntityManagerInterface or
* hook_entity_type_alter() have to implement this interface.
*
* Most simple, SQL-based entity controllers will do better by extending
- * Drupal\Core\Entity\DatabaseStorageController instead of implementing this
+ * Drupal\Core\Entity\ContentEntityDatabaseStorage instead of implementing this
* interface directly.
*/
-interface EntityStorageControllerInterface {
+interface EntityStorageInterface {
/**
* Load the most recent version of an entity's field data.
@@ -165,7 +165,7 @@ interface EntityStorageControllerInterface {
* @return \Drupal\Core\Entity\Query\QueryInterface
* The query instance.
*
- * @see \Drupal\Core\Entity\EntityStorageControllerInterface::getQueryServicename()
+ * @see \Drupal\Core\Entity\EntityStorageInterface::getQueryServicename()
*/
public function getQuery($conjunction = 'AND');
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
index 5934322..17d9555 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
@@ -136,7 +136,7 @@ interface EntityTypeInterface {
/**
* Indicates if the persistent cache of field data should be used.
*
- * @todo Used by FieldableEntityStorageControllerBase only.
+ * @todo Used by ContentEntityStorageBase only.
*
* The persistent cache should usually only be disabled if a higher level
* persistent cache is available for the entity type.
@@ -185,7 +185,7 @@ interface EntityTypeInterface {
* types (listed below) and the values are the names of the classes that
* implement that controller:
* - storage: The name of the class used to load the objects. The class must
- * implement \Drupal\Core\Entity\EntityStorageControllerInterface.
+ * implement \Drupal\Core\Entity\EntityStorageInterface.
* - form: An associative array where the keys are the names of the
* different form operations (such as 'create', 'edit', or 'delete') and
* the values are the names of the controller classes for those
@@ -514,7 +514,7 @@ interface EntityTypeInterface {
/**
* Returns the name of the entity's base table.
*
- * @todo Used by DatabaseStorageController only.
+ * @todo Used by ContentEntityDatabaseStorage only.
*
* @return string|bool
* The name of the entity's base table, or FALSE if none exists.
@@ -544,7 +544,7 @@ interface EntityTypeInterface {
/**
* Returns the name of the entity's revision data table.
*
- * @todo Used by FieldableDatabaseStorageController only.
+ * @todo Used by ContentEntityDatabaseStorage only.
*
* @return string|bool
* The name of the entity type's revision data table.
@@ -554,7 +554,7 @@ interface EntityTypeInterface {
/**
* Returns the name of the entity's revision table.
*
- * @todo Used by FieldableDatabaseStorageController only.
+ * @todo Used by ContentEntityDatabaseStorage only.
*
* @return string|bool
* The name of the entity type's revision table.
@@ -564,7 +564,7 @@ interface EntityTypeInterface {
/**
* Returns the name of the entity's data table.
*
- * @todo Used by FieldableDatabaseStorageController only.
+ * @todo Used by ContentEntityDatabaseStorage only.
*
* @return string|bool
* The name of the entity type's data table.
diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerInterface.php b/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php
index c6c360f..2998c21 100644
--- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerInterface.php
+++ b/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\ExtensibleEntityStorageControllerInterface.
+ * Contains \Drupal\Core\Entity\FieldableEntityStorageInterface.
*/
namespace Drupal\Core\Entity;
@@ -10,7 +10,7 @@ namespace Drupal\Core\Entity;
use Drupal\field\FieldConfigInterface;
use Drupal\field\FieldInstanceConfigInterface;
-interface FieldableEntityStorageControllerInterface extends EntityStorageControllerInterface {
+interface FieldableEntityStorageInterface extends EntityStorageInterface {
/**
* Allows reaction to the creation of a configurable field.
diff --git a/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php b/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php
index 44a0bf3..1efb173 100644
--- a/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php
+++ b/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php
@@ -71,7 +71,7 @@ class HtmlEntityFormController extends FormController {
$entity = $request->attributes->get($entity_type);
}
else {
- $entity = $this->manager->getStorageController($entity_type)->create(array());
+ $entity = $this->manager->getStorage($entity_type)->create(array());
}
return $this->manager->getFormController($entity_type, $operation)->setEntity($entity);
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php
index dfa6e3a..9dd3628 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php
@@ -24,7 +24,7 @@ class EntityChangedConstraintValidator extends ConstraintValidator {
/** @var $entity \Drupal\Core\Entity\EntityInterface */
$entity = $this->context->getMetadata()->getTypedData()->getEntity();
if (!$entity->isNew()) {
- $saved_entity = \Drupal::entityManager()->getStorageController($entity->getEntityTypeId())->loadUnchanged($entity->id());
+ $saved_entity = \Drupal::entityManager()->getStorage($entity->getEntityTypeId())->loadUnchanged($entity->id());
if ($saved_entity && ($saved_entity instanceof EntityChangedInterface) && ($saved_entity->getChangedTime() > $value)) {
$this->context->addViolation($constraint->message);
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryBase.php b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
index 05782dd..f5d36a1 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryBase.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
@@ -8,7 +8,7 @@
namespace Drupal\Core\Entity\Query;
use Drupal\Core\Database\Query\PagerSelectExtender;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
/**
@@ -110,12 +110,12 @@ abstract class QueryBase implements QueryInterface {
/**
* Flag indicating whether to query the current revision or all revisions.
*
- * Can be either EntityStorageControllerInterface::FIELD_LOAD_CURRENT or
- * EntityStorageControllerInterface::FIELD_LOAD_REVISION.
+ * Can be either EntityStorageInterface::FIELD_LOAD_CURRENT or
+ * EntityStorageInterface::FIELD_LOAD_REVISION.
*
* @var string
*/
- protected $age = EntityStorageControllerInterface::FIELD_LOAD_CURRENT;
+ protected $age = EntityStorageInterface::FIELD_LOAD_CURRENT;
/**
* The query pager data.
@@ -259,7 +259,7 @@ abstract class QueryBase implements QueryInterface {
/**
* Implements \Drupal\Core\Entity\Query\QueryInterface::age().
*/
- public function age($age = EntityStorageControllerInterface::FIELD_LOAD_CURRENT) {
+ public function age($age = EntityStorageInterface::FIELD_LOAD_CURRENT) {
$this->age = $age;
return $this;
}
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Entity/Query/QueryFactory.php
index fff7c86..d046c87 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryFactory.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryFactory.php
@@ -45,7 +45,7 @@ class QueryFactory extends ContainerAware {
* The query object that can query the given entity type.
*/
public function get($entity_type_id, $conjunction = 'AND') {
- $service_name = $this->entityManager->getStorageController($entity_type_id)->getQueryServicename();
+ $service_name = $this->entityManager->getStorage($entity_type_id)->getQueryServicename();
return $this->container->get($service_name)->get($this->entityManager->getDefinition($entity_type_id), $conjunction);
}
@@ -62,7 +62,7 @@ class QueryFactory extends ContainerAware {
* The aggregated query object that can query the given entity type.
*/
public function getAggregate($entity_type_id, $conjunction = 'AND') {
- $service_name = $this->entityManager->getStorageController($entity_type_id)->getQueryServicename();
+ $service_name = $this->entityManager->getStorage($entity_type_id)->getQueryServicename();
return $this->container->get($service_name)->getAggregate($this->entityManager->getDefinition($entity_type_id), $conjunction);
}
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryInterface.php b/core/lib/Drupal/Core/Entity/Query/QueryInterface.php
index 4a9420b..5c22d74 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryInterface.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryInterface.php
@@ -7,7 +7,7 @@
namespace Drupal\Core\Entity\Query;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Database\Query\AlterableInterface;
/**
@@ -159,15 +159,15 @@ interface QueryInterface extends AlterableInterface {
* @TODO: Once revision tables have been cleaned up, revisit this.
*
* @param $age
- * - EntityStorageControllerInterface::FIELD_LOAD_CURRENT (default): Query
+ * - EntityStorageInterface::FIELD_LOAD_CURRENT (default): Query
* the most recent revisions only,
- * - EntityStorageControllerInterface::FIELD_LOAD_REVISION: Query all
+ * - EntityStorageInterface::FIELD_LOAD_REVISION: Query all
* revisions.
*
* @return \Drupal\Core\Entity\Query\QueryInterface
* The called object.
*/
- public function age($age = EntityStorageControllerInterface::FIELD_LOAD_CURRENT);
+ public function age($age = EntityStorageInterface::FIELD_LOAD_CURRENT);
/**
* Execute the query.
diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
index 7308431..ee2bebc 100644
--- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
+++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
@@ -8,8 +8,8 @@
namespace Drupal\Core\Entity\Query\Sql;
use Drupal\Core\Database\Query\SelectInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\Core\Entity\Plugin\DataType\EntityReference;
use Drupal\Core\Entity\Query\QueryException;
use Drupal\field\Entity\FieldConfig;
@@ -83,7 +83,7 @@ class Tables implements TablesInterface {
for ($key = 0; $key <= $count; $key ++) {
// If there is revision support and only the current revision is being
// queried then use the revision id. Otherwise, the entity id will do.
- if (($revision_key = $entity_type->getKey('revision')) && $age == EntityStorageControllerInterface::FIELD_LOAD_CURRENT) {
+ if (($revision_key = $entity_type->getKey('revision')) && $age == EntityStorageInterface::FIELD_LOAD_CURRENT) {
// This contains the relevant SQL field to be used when joining entity
// tables.
$entity_id_field = $revision_key;
@@ -142,7 +142,7 @@ class Tables implements TablesInterface {
$values[$bundle_key] = reset($field_map[$entity_type_id][$field_name]['bundles']);
}
$entity = $entity_manager
- ->getStorageController($entity_type_id)
+ ->getStorage($entity_type_id)
->create($values);
$propertyDefinitions = $entity->$field_name->getFieldDefinition()->getPropertyDefinitions();
@@ -163,7 +163,7 @@ class Tables implements TablesInterface {
$column = 'value';
}
$table = $this->ensureFieldTable($index_prefix, $field, $type, $langcode, $base_table, $entity_id_field, $field_id_field);
- $sql_column = FieldableDatabaseStorageController::_fieldColumnName($field, $column);
+ $sql_column = ContentEntityDatabaseStorage::_fieldColumnName($field, $column);
}
// This is an entity property (non-configurable field).
else {
@@ -196,7 +196,7 @@ class Tables implements TablesInterface {
$values[$bundle_key] = key($bundles);
}
$entity = $entity_manager
- ->getStorageController($entity_type_id)
+ ->getStorage($entity_type_id)
->create($values);
$propertyDefinitions = $entity->$specifier->getFieldDefinition()->getPropertyDefinitions();
$relationship_specifier = $specifiers[$key + 1];
@@ -252,7 +252,7 @@ class Tables implements TablesInterface {
protected function ensureFieldTable($index_prefix, &$field, $type, $langcode, $base_table, $entity_id_field, $field_id_field) {
$field_name = $field->getName();
if (!isset($this->fieldTables[$index_prefix . $field_name])) {
- $table = $this->sqlQuery->getMetaData('age') == EntityStorageControllerInterface::FIELD_LOAD_CURRENT ? FieldableDatabaseStorageController::_fieldTableName($field) : FieldableDatabaseStorageController::_fieldRevisionTableName($field);
+ $table = $this->sqlQuery->getMetaData('age') == EntityStorageInterface::FIELD_LOAD_CURRENT ? ContentEntityDatabaseStorage::_fieldTableName($field) : ContentEntityDatabaseStorage::_fieldRevisionTableName($field);
if ($field->getCardinality() != 1) {
$this->sqlQuery->addMetaData('simple_query', FALSE);
}
diff --git a/core/lib/Drupal/Core/Entity/RevisionableInterface.php b/core/lib/Drupal/Core/Entity/RevisionableInterface.php
index d246d24..188127c 100644
--- a/core/lib/Drupal/Core/Entity/RevisionableInterface.php
+++ b/core/lib/Drupal/Core/Entity/RevisionableInterface.php
@@ -56,11 +56,11 @@ interface RevisionableInterface {
/**
* Acts on a revision before it gets saved.
*
- * @param EntityStorageControllerInterface $storage_controller
- * The entity storage controller object.
+ * @param EntityStorageInterface $storage
+ * The entity storage object.
* @param \stdClass $record
* The revision object.
*/
- public function preSaveRevision(EntityStorageControllerInterface $storage_controller, \stdClass $record);
+ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record);
}
diff --git a/core/lib/Drupal/Core/Field/FieldDefinition.php b/core/lib/Drupal/Core/Field/FieldDefinition.php
index 27e84cc..e5f4734 100644
--- a/core/lib/Drupal/Core/Field/FieldDefinition.php
+++ b/core/lib/Drupal/Core/Field/FieldDefinition.php
@@ -498,7 +498,7 @@ class FieldDefinition extends ListDataDefinition implements FieldDefinitionInter
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
- * Pass FALSE if the storage controller takes care of storing the field,
+ * Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
diff --git a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php
index 94eb207..61a879b 100644
--- a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php
+++ b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php
@@ -347,13 +347,12 @@ interface FieldDefinitionInterface extends ListDataDefinitionInterface {
/**
* Returns the storage behavior for this field.
*
- * Indicates whether the entity type's storage controller should take care of
- * storing the field values or whether it is handled separately; e.g. by the
+ * Indicates whether the entity type's storage should take care of storing the
+ * field values or whether it is handled separately; e.g. by the
* module providing the field.
*
* @return bool
- * FALSE if the storage controller takes care of storing the field, TRUE
- * otherwise.
+ * FALSE if the storage takes care of storing the field, TRUE otherwise.
*/
public function hasCustomStorage();
diff --git a/core/lib/Drupal/Core/ParamConverter/EntityConverter.php b/core/lib/Drupal/Core/ParamConverter/EntityConverter.php
index cc0ffed..e906814 100644
--- a/core/lib/Drupal/Core/ParamConverter/EntityConverter.php
+++ b/core/lib/Drupal/Core/ParamConverter/EntityConverter.php
@@ -38,7 +38,7 @@ class EntityConverter implements ParamConverterInterface {
*/
public function convert($value, $definition, $name, array $defaults, Request $request) {
$entity_type = substr($definition['type'], strlen('entity:'));
- if ($storage = $this->entityManager->getStorageController($entity_type)) {
+ if ($storage = $this->entityManager->getStorage($entity_type)) {
return $storage->load($value);
}
}
diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php
index a76357a..704fc79 100644
--- a/core/lib/Drupal/Core/Session/UserSession.php
+++ b/core/lib/Drupal/Core/Session/UserSession.php
@@ -141,7 +141,7 @@ class UserSession implements AccountInterface {
return TRUE;
}
- $roles = \Drupal::entityManager()->getStorageController('user_role')->loadMultiple($this->getRoles());
+ $roles = \Drupal::entityManager()->getStorage('user_role')->loadMultiple($this->getRoles());
foreach ($roles as $role) {
if ($role->hasPermission($permission)) {
diff --git a/core/modules/action/lib/Drupal/action/ActionAddFormController.php b/core/modules/action/lib/Drupal/action/ActionAddFormController.php
index a1cf893..db02415 100644
--- a/core/modules/action/lib/Drupal/action/ActionAddFormController.php
+++ b/core/modules/action/lib/Drupal/action/ActionAddFormController.php
@@ -9,7 +9,7 @@ namespace Drupal\action;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Action\ActionManager;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -27,13 +27,13 @@ class ActionAddFormController extends ActionFormControllerBase {
/**
* Constructs a new ActionAddFormController.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The action storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The action storage.
* @param \Drupal\Core\Action\ActionManager $action_manager
* The action plugin manager.
*/
- public function __construct(EntityStorageControllerInterface $storage_controller, ActionManager $action_manager) {
- parent::__construct($storage_controller);
+ public function __construct(EntityStorageInterface $storage, ActionManager $action_manager) {
+ parent::__construct($storage);
$this->actionManager = $action_manager;
}
@@ -43,7 +43,7 @@ class ActionAddFormController extends ActionFormControllerBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('action'),
+ $container->get('entity.manager')->getStorage('action'),
$container->get('plugin.manager.action')
);
}
diff --git a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
index 3cf0cde..f6dd192 100644
--- a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
+++ b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
@@ -8,7 +8,7 @@
namespace Drupal\action;
use Drupal\Core\Entity\EntityFormController;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -25,20 +25,20 @@ abstract class ActionFormControllerBase extends EntityFormController {
protected $plugin;
/**
- * The action storage controller.
+ * The action storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* Constructs a new action form.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The action storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The action storage.
*/
- public function __construct(EntityStorageControllerInterface $storage_controller) {
- $this->storageController = $storage_controller;
+ public function __construct(EntityStorageInterface $storage) {
+ $this->storage = $storage;
}
/**
@@ -46,7 +46,7 @@ abstract class ActionFormControllerBase extends EntityFormController {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('action')
+ $container->get('entity.manager')->getStorage('action')
);
}
@@ -106,7 +106,7 @@ abstract class ActionFormControllerBase extends EntityFormController {
* TRUE if the action exists, FALSE otherwise.
*/
public function exists($id) {
- $action = $this->storageController->load($id);
+ $action = $this->storage->load($id);
return !empty($action);
}
diff --git a/core/modules/action/lib/Drupal/action/ActionListBuilder.php b/core/modules/action/lib/Drupal/action/ActionListBuilder.php
index 7ef6e19..76c4f2f 100644
--- a/core/modules/action/lib/Drupal/action/ActionListBuilder.php
+++ b/core/modules/action/lib/Drupal/action/ActionListBuilder.php
@@ -10,7 +10,7 @@ namespace Drupal\action;
use Drupal\Core\Action\ActionManager;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -39,12 +39,12 @@ class ActionListBuilder extends ConfigEntityListBuilder {
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The action storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The action storage.
* @param \Drupal\Core\Action\ActionManager $action_manager
* The action plugin manager.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, ActionManager $action_manager) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ActionManager $action_manager) {
parent::__construct($entity_type, $storage);
$this->actionManager = $action_manager;
@@ -56,7 +56,7 @@ class ActionListBuilder extends ConfigEntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('plugin.manager.action')
);
}
diff --git a/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php b/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php
index a924861..ff0dca6 100644
--- a/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php
+++ b/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php
@@ -32,11 +32,11 @@ class EmailAction extends ConfigurableActionBase implements ContainerFactoryPlug
protected $token;
/**
- * The user storage controller.
+ * The user storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* Constructs a EmailAction object.
@@ -56,7 +56,7 @@ class EmailAction extends ConfigurableActionBase implements ContainerFactoryPlug
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->token = $token;
- $this->storageController = $entity_manager->getStorageController('user');
+ $this->storage = $entity_manager->getStorage('user');
}
/**
@@ -82,7 +82,7 @@ class EmailAction extends ConfigurableActionBase implements ContainerFactoryPlug
// If the recipient is a registered user with a language preference, use
// the recipient's preferred language. Otherwise, use the system default
// language.
- $recipient_accounts = $this->storageController->loadByProperties(array('mail' => $recipient));
+ $recipient_accounts = $this->storage->loadByProperties(array('mail' => $recipient));
$recipient_account = reset($recipient_accounts);
if ($recipient_account) {
$langcode = $recipient_account->getPreferredLangcode();
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index fcb28e4..86011d6 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -137,7 +137,7 @@ function aggregator_permission() {
function aggregator_cron() {
$queue = \Drupal::queue('aggregator_feeds');
- $result = \Drupal::entityManager()->getStorageController('aggregator_feed')->getFeedIdsToRefresh();
+ $result = \Drupal::entityManager()->getStorage('aggregator_feed')->getFeedIdsToRefresh();
foreach ($result as $fid) {
$feed = aggregator_feed_load($fid);
if ($queue->createItem($feed)) {
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
index b3baf9b..d590b08 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
@@ -25,7 +25,7 @@ class AggregatorController extends ControllerBase {
* A form array as expected by drupal_render().
*/
public function feedAdd() {
- $feed = $this->entityManager()->getStorageController('aggregator_feed')
+ $feed = $this->entityManager()->getStorage('aggregator_feed')
->create(array(
'refresh' => 3600,
));
@@ -46,7 +46,7 @@ class AggregatorController extends ControllerBase {
$feed_source = $entity_manager->getViewBuilder('aggregator_feed')
->view($aggregator_feed, 'default');
// Load aggregator feed item for the particular feed id.
- $items = $entity_manager->getStorageController('aggregator_item')->loadByFeed($aggregator_feed->id(), 20);
+ $items = $entity_manager->getStorage('aggregator_item')->loadByFeed($aggregator_feed->id(), 20);
// Print the feed items.
$build = $this->buildPageList($items, $feed_source);
return $build;
@@ -106,7 +106,7 @@ class AggregatorController extends ControllerBase {
*/
public function adminOverview() {
$entity_manager = $this->entityManager();
- $feeds = $entity_manager->getStorageController('aggregator_feed')
+ $feeds = $entity_manager->getStorage('aggregator_feed')
->loadMultiple();
$header = array($this->t('Title'), $this->t('Items'), $this->t('Last update'), $this->t('Next update'), $this->t('Operations'));
@@ -114,7 +114,7 @@ class AggregatorController extends ControllerBase {
foreach ($feeds as $feed) {
$row = array();
$row[] = l($feed->label(), "aggregator/sources/" . $feed->id());
- $row[] = format_plural($entity_manager->getStorageController('aggregator_item')->getItemCount($feed), '1 item', '@count items');
+ $row[] = format_plural($entity_manager->getStorage('aggregator_item')->getItemCount($feed), '1 item', '@count items');
$last_checked = $feed->getLastCheckedTime();
$refresh_rate = $feed->getRefreshRate();
$row[] = ($last_checked ? $this->t('@time ago', array('@time' => format_interval(REQUEST_TIME - $last_checked))) : $this->t('never'));
@@ -165,7 +165,7 @@ class AggregatorController extends ControllerBase {
* The rendered list of items for the feed.
*/
public function pageLast() {
- $items = $this->entityManager()->getStorageController('aggregator_item')->loadAll(20);
+ $items = $this->entityManager()->getStorage('aggregator_item')->loadAll(20);
$build = $this->buildPageList($items);
$build['#attached']['drupal_add_feed'][] = array('aggregator/rss', $this->config('system.site')->get('name') . ' ' . $this->t('aggregator'));
return $build;
@@ -180,7 +180,7 @@ class AggregatorController extends ControllerBase {
public function sources() {
$entity_manager = $this->entityManager();
- $feeds = $entity_manager->getStorageController('aggregator_feed')->loadMultiple();
+ $feeds = $entity_manager->getStorage('aggregator_feed')->loadMultiple();
$build = array(
'#type' => 'container',
@@ -194,7 +194,7 @@ class AggregatorController extends ControllerBase {
$aggregator_summary_items = $this->config('aggregator.settings')
->get('source.list_max');
if ($aggregator_summary_items) {
- $items = $entity_manager->getStorageController('aggregator_item')
+ $items = $entity_manager->getStorage('aggregator_item')
->loadByFeed($feed->id(), 20);
if ($items) {
$summary_items = $entity_manager->getViewBuilder('aggregator_item')
@@ -224,7 +224,7 @@ class AggregatorController extends ControllerBase {
*/
public function opmlPage() {
$feeds = $this->entityManager()
- ->getStorageController('aggregator_feed')
+ ->getStorage('aggregator_feed')
->loadMultiple();
$feeds = $result->fetchAll();
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php
index fa7e0fc..b284823 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php
@@ -11,7 +11,7 @@ use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Symfony\Component\DependencyInjection\Container;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\aggregator\FeedInterface;
/**
@@ -21,7 +21,7 @@ use Drupal\aggregator\FeedInterface;
* id = "aggregator_feed",
* label = @Translation("Aggregator feed"),
* controllers = {
- * "storage" = "Drupal\aggregator\FeedStorageController",
+ * "storage" = "Drupal\aggregator\FeedStorage",
* "view_builder" = "Drupal\aggregator\FeedViewBuilder",
* "form" = {
* "default" = "Drupal\aggregator\FeedFormController",
@@ -92,7 +92,7 @@ class Feed extends ContentEntityBase implements FeedInterface {
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
$values += array(
'link' => '',
'description' => '',
@@ -103,7 +103,7 @@ class Feed extends ContentEntityBase implements FeedInterface {
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
foreach ($entities as $entity) {
// Notify processors to delete stored items.
\Drupal::service('aggregator.items.importer')->delete($entity);
@@ -113,7 +113,7 @@ class Feed extends ContentEntityBase implements FeedInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
if (\Drupal::moduleHandler()->moduleExists('block')) {
// Make sure there are no active blocks for these feeds.
$ids = \Drupal::entityQuery('block')
@@ -121,7 +121,7 @@ class Feed extends ContentEntityBase implements FeedInterface {
->condition('settings.feed', array_keys($entities))
->execute();
if ($ids) {
- $block_storage = \Drupal::entityManager()->getStorageController('block');
+ $block_storage = \Drupal::entityManager()->getStorage('block');
$block_storage->delete($block_storage->loadMultiple($ids));
}
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
index 524e68f..19b2bbf 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
@@ -8,7 +8,7 @@
namespace Drupal\aggregator\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\aggregator\ItemInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
@@ -20,7 +20,7 @@ use Drupal\Core\Field\FieldDefinition;
* id = "aggregator_item",
* label = @Translation("Aggregator feed item"),
* controllers = {
- * "storage" = "Drupal\aggregator\ItemStorageController",
+ * "storage" = "Drupal\aggregator\ItemStorage",
* "view_builder" = "Drupal\aggregator\ItemViewBuilder"
* },
* base_table = "aggregator_item",
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php
index 301ee25..f5ec5f6 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php
@@ -67,8 +67,8 @@ class FeedFormController extends ContentEntityFormController {
public function validate(array $form, array &$form_state) {
$feed = $this->buildEntity($form, $form_state);
// Check for duplicate titles.
- $feed_storage_controller = $this->entityManager->getStorageController('aggregator_feed');
- $result = $feed_storage_controller->getFeedDuplicates($feed);
+ $feed_storage = $this->entityManager->getStorage('aggregator_feed');
+ $result = $feed_storage->getFeedDuplicates($feed);
foreach ($result as $item) {
if (strcasecmp($item->label(), $feed->label()) == 0) {
$this->setFormError('title', $form_state, $this->t('A feed named %feed already exists. Enter a unique title.', array('%feed' => $feed->label())));
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageController.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php
index 9e1ecb2..5824240 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php
@@ -2,21 +2,21 @@
/**
* @file
- * Contains \Drupal\aggregator\FeedStorageController.
+ * Contains \Drupal\aggregator\FeedStorage.
*/
namespace Drupal\aggregator;
use Drupal\aggregator\FeedInterface;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
/**
* Controller class for aggregator's feeds.
*
- * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding
- * required special handling for feed entities.
+ * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class,
+ * adding required special handling for feed entities.
*/
-class FeedStorageController extends FieldableDatabaseStorageController implements FeedStorageControllerInterface {
+class FeedStorage extends ContentEntityDatabaseStorage implements FeedStorageInterface {
/**
* {@inheritdoc}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageControllerInterface.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageInterface.php
index c622806..2746b69 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageControllerInterface.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageInterface.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains \Drupal\aggregator\FeedStorageControllerInterface.
+ * Contains \Drupal\aggregator\FeedStorageInterface.
*/
namespace Drupal\aggregator;
use Drupal\aggregator\FeedInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines a common interface for aggregator feed entity controller classes.
*/
-interface FeedStorageControllerInterface extends EntityStorageControllerInterface {
+interface FeedStorageInterface extends EntityStorageInterface {
/**
* Provides a list of duplicate feeds.
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
index 1ba376b..4284ee1 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
@@ -7,7 +7,7 @@
namespace Drupal\aggregator\Form;
-use Drupal\aggregator\FeedStorageControllerInterface;
+use Drupal\aggregator\FeedStorageInterface;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Form\FormBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -23,9 +23,9 @@ class OpmlFeedAdd extends FormBase {
/**
* The feed storage.
*
- * @var \Drupal\aggregator\FeedStorageControllerInterface
+ * @var \Drupal\aggregator\FeedStorageInterface
*/
- protected $feedStorageController;
+ protected $feedStorage;
/**
* The HTTP client to fetch the feed data with.
@@ -37,13 +37,13 @@ class OpmlFeedAdd extends FormBase {
/**
* Constructs a database object.
*
- * @param \Drupal\aggregator\FeedStorageControllerInterface $feed_storage
+ * @param \Drupal\aggregator\FeedStorageInterface $feed_storage
* The feed storage.
* @param \Guzzle\Http\ClientInterface $http_client
* The Guzzle HTTP client.
*/
- public function __construct(FeedStorageControllerInterface $feed_storage, ClientInterface $http_client) {
- $this->feedStorageController = $feed_storage;
+ public function __construct(FeedStorageInterface $feed_storage, ClientInterface $http_client) {
+ $this->feedStorage = $feed_storage;
$this->httpClient = $http_client;
}
@@ -52,7 +52,7 @@ class OpmlFeedAdd extends FormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('aggregator_feed'),
+ $container->get('entity.manager')->getStorage('aggregator_feed'),
$container->get('http_default_client')
);
}
@@ -152,14 +152,14 @@ class OpmlFeedAdd extends FormBase {
}
// Check for duplicate titles or URLs.
- $query = $this->feedStorageController->getQuery();
+ $query = $this->feedStorage->getQuery();
$condition = $query->orConditionGroup()
->condition('title', $feed['title'])
->condition('url', $feed['url']);
$ids = $query
->condition($condition)
->execute();
- $result = $this->feedStorageController->loadMultiple($ids);
+ $result = $this->feedStorage->loadMultiple($ids);
foreach ($result as $old) {
if (strcasecmp($old->label(), $feed['title']) == 0) {
drupal_set_message($this->t('A feed named %title already exists.', array('%title' => $old->label())), 'warning');
@@ -171,7 +171,7 @@ class OpmlFeedAdd extends FormBase {
}
}
- $new_feed = $this->feedStorageController->create(array(
+ $new_feed = $this->feedStorage->create(array(
'title' => $feed['title'],
'url' => $feed['url'],
'refresh' => $form_state['values']['refresh'],
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php
index 3900f73..bedea41 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php
@@ -2,22 +2,22 @@
/**
* @file
- * Contains \Drupal\aggregator\ItemStorageController.
+ * Contains \Drupal\aggregator\ItemStorage.
*/
namespace Drupal\aggregator;
use Drupal\aggregator\Entity\Item;
use Drupal\Core\Entity\Query\QueryInterface;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
/**
* Controller class for aggregators items.
*
- * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding
- * required special handling for feed item entities.
+ * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class,
+ * adding required special handling for feed item entities.
*/
-class ItemStorageController extends FieldableDatabaseStorageController implements ItemStorageControllerInterface {
+class ItemStorage extends ContentEntityDatabaseStorage implements ItemStorageInterface {
/**
* {@inheritdoc}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageControllerInterface.php b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageInterface.php
index 55f7d2d..4f21a05 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageControllerInterface.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageInterface.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains Drupal\aggregator\ItemStorageControllerInterface.
+ * Contains Drupal\aggregator\ItemStorageInterface.
*/
namespace Drupal\aggregator;
use Drupal\aggregator\Entity\Item;
-use Drupal\core\Entity\EntityStorageControllerInterface;
+use Drupal\core\Entity\EntityStorageInterface;
/**
* Defines a common interface for aggregator item entity controller classes.
*/
-interface ItemStorageControllerInterface extends EntityStorageControllerInterface {
+interface ItemStorageInterface extends EntityStorageInterface {
/**
* Returns the count of the items in a feed.
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
index 4c5827a..beb271a 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
@@ -7,8 +7,8 @@
namespace Drupal\aggregator\Plugin\Block;
-use Drupal\aggregator\FeedStorageControllerInterface;
-use Drupal\aggregator\ItemStorageControllerInterface;
+use Drupal\aggregator\FeedStorageInterface;
+use Drupal\aggregator\ItemStorageInterface;
use Drupal\block\BlockBase;
use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -27,16 +27,16 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class AggregatorFeedBlock extends BlockBase implements ContainerFactoryPluginInterface {
/**
- * The entity storage controller for feeds.
+ * The entity storage for feeds.
*
- * @var \Drupal\aggregator\FeedStorageControllerInterface
+ * @var \Drupal\aggregator\FeedStorageInterface
*/
protected $feedStorage;
/**
- * The entity storage controller for items.
+ * The entity storage for items.
*
- * @var \Drupal\aggregator\ItemStorageControllerInterface
+ * @var \Drupal\aggregator\ItemStorageInterface
*/
protected $itemStorage;
@@ -56,14 +56,14 @@ class AggregatorFeedBlock extends BlockBase implements ContainerFactoryPluginInt
* The plugin_id for the plugin instance.
* @param array $plugin_definition
* The plugin implementation definition.
- * @param \Drupal\aggregator\FeedStorageControllerInterface $feed_storage
- * The entity storage controller for feeds.
- * @param \Drupal\aggregator\ItemStorageControllerInterface $item_storage
- * The entity storage controller for feed items.
+ * @param \Drupal\aggregator\FeedStorageInterface $feed_storage
+ * The entity storage for feeds.
+ * @param \Drupal\aggregator\ItemStorageInterface $item_storage
+ * The entity storage for feed items.
* @param \Drupal\Core\Entity\Query\QueryInterface $item_query
* The entity query object for feed items.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, FeedStorageControllerInterface $feed_storage, ItemStorageControllerInterface $item_storage, QueryInterface $item_query) {
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, FeedStorageInterface $feed_storage, ItemStorageInterface $item_storage, QueryInterface $item_query) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->feedStorage = $feed_storage;
$this->itemStorage = $item_storage;
@@ -79,8 +79,8 @@ class AggregatorFeedBlock extends BlockBase implements ContainerFactoryPluginInt
$configuration,
$plugin_id,
$plugin_definition,
- $container->get('entity.manager')->getStorageController('aggregator_feed'),
- $container->get('entity.manager')->getStorageController('aggregator_item'),
+ $container->get('entity.manager')->getStorage('aggregator_feed'),
+ $container->get('entity.manager')->getStorage('aggregator_item'),
$container->get('entity.query')->get('aggregator_item')
);
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
index f5f4ebc..8dd48d1 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
@@ -7,7 +7,7 @@
namespace Drupal\aggregator\Plugin\aggregator\processor;
-use Drupal\aggregator\ItemStorageControllerInterface;
+use Drupal\aggregator\ItemStorageInterface;
use Drupal\aggregator\Plugin\AggregatorPluginSettingsBase;
use Drupal\aggregator\Plugin\ProcessorInterface;
use Drupal\aggregator\FeedInterface;
@@ -45,9 +45,9 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor
protected $itemQuery;
/**
- * The entity storage controller for items.
+ * The entity storage for items.
*
- * @var \Drupal\aggregator\ItemStorageControllerInterface
+ * @var \Drupal\aggregator\ItemStorageInterface
*/
protected $itemStorage;
@@ -64,10 +64,10 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor
* The configuration factory object.
* @param \Drupal\Core\Entity\Query\QueryInterface $item_query
* The entity query object for feed items.
- * @param \Drupal\aggregator\ItemStorageControllerInterface $item_storage
- * The entity storage controller for feed items.
+ * @param \Drupal\aggregator\ItemStorageInterface $item_storage
+ * The entity storage for feed items.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactoryInterface $config, QueryInterface $item_query, ItemStorageControllerInterface $item_storage) {
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactoryInterface $config, QueryInterface $item_query, ItemStorageInterface $item_storage) {
$this->configFactory = $config;
$this->itemStorage = $item_storage;
$this->itemQuery = $item_query;
@@ -86,7 +86,7 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor
$plugin_definition,
$container->get('config.factory'),
$container->get('entity.query')->get('aggregator_item'),
- $container->get('entity.manager')->getStorageController('aggregator_item')
+ $container->get('entity.manager')->getStorage('aggregator_item')
);
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php
index d5e2439..04cd06c 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php
@@ -58,7 +58,7 @@ class Fid extends Numeric {
function titleQuery() {
$titles = array();
- $feeds = $this->entityManager->getStorageController('aggregator_feed')->loadMultiple($this->value);
+ $feeds = $this->entityManager->getStorage('aggregator_feed')->loadMultiple($this->value);
foreach ($feeds as $feed) {
$titles[] = String::checkPlain($feed->label());
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php
index a8c9146..fc1da58 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php
@@ -58,7 +58,7 @@ class Iid extends Numeric {
function titleQuery() {
$titles = array();
- $items = $this->entityManager->getStorageController('aggregator_item')->loadMultiple($this->value);
+ $items = $this->entityManager->getStorage('aggregator_item')->loadMultiple($this->value);
foreach ($items as $feed) {
$titles[] = String::checkPlain($feed->label());
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/DeleteFeedTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/DeleteFeedTest.php
index db38dec..69406d6 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/DeleteFeedTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/DeleteFeedTest.php
@@ -45,7 +45,7 @@ class DeleteFeedTest extends AggregatorTestBase {
// Delete feed.
$this->deleteFeed($feed1);
$this->assertText($feed2->label());
- $block_storage = $this->container->get('entity.manager')->getStorageController('block');
+ $block_storage = $this->container->get('entity.manager')->getStorage('block');
$this->assertNull($block_storage->load($block->id()), 'Block for the deleted feed was deleted.');
$this->assertEqual($block2->id(), $block_storage->load($block2->id())->id(), 'Block for not deleted feed still exists.');
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php
index f129067..3f4d7b5 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php
@@ -31,18 +31,18 @@ class IntegrationTest extends ViewUnitTestBase {
public static $testViews = array('test_aggregator_items');
/**
- * The entity storage controller for aggregator items.
+ * The entity storage for aggregator items.
*
- * @var \Drupal\aggregator\ItemStorageController
+ * @var \Drupal\aggregator\ItemStorage
*/
- protected $itemStorageController;
+ protected $itemStorage;
/**
- * The entity storage controller for aggregator feeds.
+ * The entity storage for aggregator feeds.
*
- * @var \Drupal\aggregator\FeedStorageController
+ * @var \Drupal\aggregator\FeedStorage
*/
- protected $feedStorageController;
+ protected $feedStorage;
public static function getInfo() {
return array(
@@ -59,8 +59,8 @@ class IntegrationTest extends ViewUnitTestBase {
ViewTestData::createTestViews(get_class($this), array('aggregator_test_views'));
- $this->itemStorageController = $this->container->get('entity.manager')->getStorageController('aggregator_item');
- $this->feedStorageController = $this->container->get('entity.manager')->getStorageController('aggregator_feed');
+ $this->itemStorage = $this->container->get('entity.manager')->getStorage('aggregator_item');
+ $this->feedStorage = $this->container->get('entity.manager')->getStorage('aggregator_feed');
}
/**
@@ -79,7 +79,7 @@ class IntegrationTest extends ViewUnitTestBase {
$values['link'] = 'http://drupal.org/node/' . mt_rand(1000, 10000);
$values['guid'] = $this->randomString();
- $aggregator_item = $this->itemStorageController->create($values);
+ $aggregator_item = $this->itemStorage->create($values);
$aggregator_item->save();
$items[$aggregator_item->id()] = $aggregator_item;
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
index 3ed3842..e30c42d 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
@@ -9,7 +9,7 @@ namespace Drupal\custom_block\Controller;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Controller\ControllerBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\custom_block\CustomBlockTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
@@ -17,16 +17,16 @@ use Symfony\Component\HttpFoundation\Request;
class CustomBlockController extends ControllerBase {
/**
- * The custom block storage controller.
+ * The custom block storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $customBlockStorage;
/**
- * The custom block type storage controller.
+ * The custom block type storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $customBlockTypeStorage;
@@ -36,20 +36,20 @@ class CustomBlockController extends ControllerBase {
public static function create(ContainerInterface $container) {
$entity_manager = $container->get('entity.manager');
return new static(
- $entity_manager->getStorageController('custom_block'),
- $entity_manager->getStorageController('custom_block_type')
+ $entity_manager->getStorage('custom_block'),
+ $entity_manager->getStorage('custom_block_type')
);
}
/**
* Constructs a CustomBlock object.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $custom_block_storage
- * The custom block storage controller.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $custom_block_type_storage
- * The custom block type storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $custom_block_storage
+ * The custom block storage.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $custom_block_type_storage
+ * The custom block type storage.
*/
- public function __construct(EntityStorageControllerInterface $custom_block_storage, EntityStorageControllerInterface $custom_block_type_storage) {
+ public function __construct(EntityStorageInterface $custom_block_storage, EntityStorageInterface $custom_block_type_storage) {
$this->customBlockStorage = $custom_block_storage;
$this->customBlockTypeStorage = $custom_block_type_storage;
}
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
index dcfc49c..a476182 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
@@ -10,7 +10,7 @@ namespace Drupal\custom_block;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\ContentEntityFormController;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Language\Language;
use Drupal\Core\Language\LanguageManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -23,7 +23,7 @@ class CustomBlockFormController extends ContentEntityFormController {
/**
* The custom block storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $customBlockStorage;
@@ -39,12 +39,12 @@ class CustomBlockFormController extends ContentEntityFormController {
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $custom_block_storage
- * The custom block storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $custom_block_storage
+ * The custom block storage.
* @param \Drupal\Core\Language\LanguageManager $language_manager
* The language manager.
*/
- public function __construct(EntityManagerInterface $entity_manager, EntityStorageControllerInterface $custom_block_storage, LanguageManager $language_manager) {
+ public function __construct(EntityManagerInterface $entity_manager, EntityStorageInterface $custom_block_storage, LanguageManager $language_manager) {
parent::__construct($entity_manager);
$this->customBlockStorage = $custom_block_storage;
$this->languageManager = $language_manager;
@@ -57,7 +57,7 @@ class CustomBlockFormController extends ContentEntityFormController {
$entity_manager = $container->get('entity.manager');
return new static(
$entity_manager,
- $entity_manager->getStorageController('custom_block'),
+ $entity_manager->getStorage('custom_block'),
$container->get('language_manager')
);
}
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 ec8d614..68414d3 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
@@ -8,7 +8,7 @@
namespace Drupal\custom_block\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\custom_block\CustomBlockInterface;
@@ -101,8 +101,8 @@ class CustomBlock extends ContentEntityBase implements CustomBlockInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
// Invalidate the block cache to update custom block-based derivatives.
\Drupal::service('plugin.manager.block')->clearCachedDefinitions();
@@ -118,8 +118,8 @@ class CustomBlock extends ContentEntityBase implements CustomBlockInterface {
/**
* {@inheritdoc}
*/
- public function preSaveRevision(EntityStorageControllerInterface $storage_controller, \stdClass $record) {
- parent::preSaveRevision($storage_controller, $record);
+ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
+ parent::preSaveRevision($storage, $record);
if ($this->isNewRevision()) {
// When inserting either a new custom block or a new custom_block
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 57ed007..e8eee2e 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
@@ -8,7 +8,7 @@
namespace Drupal\custom_block\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\custom_block\CustomBlockTypeInterface;
/**
@@ -72,8 +72,8 @@ class CustomBlockType extends ConfigEntityBase implements CustomBlockTypeInterfa
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if (!$update) {
entity_invoke_bundle_hook('create', 'custom_block', $this->id());
@@ -89,8 +89,8 @@ class CustomBlockType extends ConfigEntityBase implements CustomBlockTypeInterfa
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
foreach ($entities as $entity) {
entity_invoke_bundle_hook('delete', 'custom_block', $entity->id());
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php
index fa7cc8f..5e5bd08 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php
@@ -82,7 +82,7 @@ class CustomBlockListTest extends WebTestBase {
// Edit the entity using the operations link.
$blocks = $this->container
->get('entity.manager')
- ->getStorageController('custom_block')
+ ->getStorage('custom_block')
->loadByProperties(array('info' => $label));
$block = reset($blocks);
if (!empty($block)) {
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php
index 82cb852..d107ad7 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php
@@ -146,10 +146,10 @@ class CustomBlockTypeTest extends CustomBlockTestBase {
$type = $this->createCustomBlockType('foo');
$type = $this->createCustomBlockType('bar');
- // Get the custom block storage controller.
- $storage_controller = $this->container
+ // Get the custom block storage.
+ $storage = $this->container
->get('entity.manager')
- ->getStorageController('custom_block');
+ ->getStorage('custom_block');
// Enable all themes.
theme_enable(array('bartik', 'seven'));
@@ -180,7 +180,7 @@ class CustomBlockTypeTest extends CustomBlockTestBase {
// Create a new block.
$edit = array('info' => $this->randomName(8));
$this->drupalPostForm(NULL, $edit, t('Save'));
- $blocks = $storage_controller->loadByProperties(array('info' => $edit['info']));
+ $blocks = $storage->loadByProperties(array('info' => $edit['info']));
if (!empty($blocks)) {
$block = reset($blocks);
$destination = 'admin/structure/block/add/custom_block:' . $block->uuid() . '/' . $theme;
@@ -201,7 +201,7 @@ class CustomBlockTypeTest extends CustomBlockTestBase {
$this->clickLink('foo');
$edit = array('info' => $this->randomName(8));
$this->drupalPostForm(NULL, $edit, t('Save'));
- $blocks = $storage_controller->loadByProperties(array('info' => $edit['info']));
+ $blocks = $storage->loadByProperties(array('info' => $edit['info']));
if (!empty($blocks)) {
$destination = 'admin/structure/block/custom-blocks';
$this->assertUrl(url($destination, array('absolute' => TRUE)));
diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php
index 4ce4c81..c4efba1 100644
--- a/core/modules/block/lib/Drupal/block/BlockFormController.php
+++ b/core/modules/block/lib/Drupal/block/BlockFormController.php
@@ -29,11 +29,11 @@ class BlockFormController extends EntityFormController {
protected $entity;
/**
- * The block storage controller.
+ * The block storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* The language manager.
@@ -60,7 +60,7 @@ class BlockFormController extends EntityFormController {
* The config factory.
*/
public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory) {
- $this->storageController = $entity_manager->getStorageController('block');
+ $this->storage = $entity_manager->getStorage('block');
$this->languageManager = $language_manager;
$this->configFactory = $config_factory;
}
@@ -361,7 +361,7 @@ class BlockFormController extends EntityFormController {
$suggestion = $block->getPlugin()->getMachineNameSuggestion();
// Get all the blocks which starts with the suggested machine name.
- $query = $this->storageController->getQuery();
+ $query = $this->storage->getQuery();
$query->condition('id', $suggestion, 'CONTAINS');
$block_ids = $query->execute();
diff --git a/core/modules/block/lib/Drupal/block/BlockListBuilder.php b/core/modules/block/lib/Drupal/block/BlockListBuilder.php
index 31b3286..1b93f8c 100644
--- a/core/modules/block/lib/Drupal/block/BlockListBuilder.php
+++ b/core/modules/block/lib/Drupal/block/BlockListBuilder.php
@@ -13,7 +13,7 @@ use Drupal\Component\Utility\String;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Form\FormInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -59,12 +59,12 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Component\Plugin\PluginManagerInterface $block_manager
* The block manager.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, PluginManagerInterface $block_manager) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, PluginManagerInterface $block_manager) {
parent::__construct($entity_type, $storage);
$this->blockManager = $block_manager;
@@ -76,7 +76,7 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('plugin.manager.block')
);
}
diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php b/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php
index 716bc6e..dacfde3 100644
--- a/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php
+++ b/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php
@@ -28,7 +28,7 @@ class BlockAddController extends ControllerBase {
*/
public function blockAddConfigureForm($plugin_id, $theme) {
// Create a block entity.
- $entity = $this->entityManager()->getStorageController('block')->create(array('plugin' => $plugin_id, 'theme' => $theme));
+ $entity = $this->entityManager()->getStorage('block')->create(array('plugin' => $plugin_id, 'theme' => $theme));
return $this->entityFormBuilder()->getForm($entity);
}
diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php
index 94fe675..9e17171 100644
--- a/core/modules/block/lib/Drupal/block/Entity/Block.php
+++ b/core/modules/block/lib/Drupal/block/Entity/Block.php
@@ -13,7 +13,7 @@ use Drupal\block\BlockPluginBag;
use Drupal\block\BlockInterface;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines a Block configuration entity class.
@@ -151,8 +151,8 @@ class Block extends ConfigEntityBase implements BlockInterface, EntityWithPlugin
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if ($update) {
Cache::invalidateTags(array('block' => $this->id()));
@@ -168,8 +168,8 @@ class Block extends ConfigEntityBase implements BlockInterface, EntityWithPlugin
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
Cache::invalidateTags(array('block' => array_keys($entities)));
}
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php
index 1a7ea82..b6aa269 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php
@@ -75,7 +75,7 @@ class BlockRenderOrderTest extends WebTestBase {
$this->drupalGet('');
$test_content = $this->drupalGetContent('');
- $controller = $this->container->get('entity.manager')->getStorageController('block');
+ $controller = $this->container->get('entity.manager')->getStorage('block');
foreach ($controller->loadMultiple() as $return_block) {
$id = $return_block->get('id');
if ($return_block_weight = $return_block->get('weight')) {
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
index e63fb2b..79c572e 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
@@ -7,7 +7,7 @@
namespace Drupal\block\Tests;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
use Drupal\simpletest\DrupalUnitTestBase;
use Drupal\block_test\Plugin\Block\TestHtmlBlock;
use Drupal\Component\Plugin\Exception\PluginException;
@@ -27,9 +27,9 @@ class BlockStorageUnitTest extends DrupalUnitTestBase {
public static $modules = array('block', 'block_test', 'system');
/**
- * The block storage controller.
+ * The block storage.
*
- * @var \Drupal\Core\Config\Entity\ConfigStorageControllerInterface.
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface.
*/
protected $controller;
@@ -44,14 +44,14 @@ class BlockStorageUnitTest extends DrupalUnitTestBase {
protected function setUp() {
parent::setUp();
- $this->controller = $this->container->get('entity.manager')->getStorageController('block');
+ $this->controller = $this->container->get('entity.manager')->getStorage('block');
}
/**
* Tests CRUD operations.
*/
public function testBlockCRUD() {
- $this->assertTrue($this->controller instanceof ConfigStorageController, 'The block storage controller is loaded.');
+ $this->assertTrue($this->controller instanceof ConfigEntityStorage, 'The block storage is loaded.');
// Run each test method in the same installation.
$this->createTests();
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php b/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php
index 39aa634..88073c3 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php
@@ -66,7 +66,7 @@ abstract class BlockTestBase extends WebTestBase {
'sidebar_second',
'footer',
);
- $block_storage = $this->container->get('entity.manager')->getStorageController('block');
+ $block_storage = $this->container->get('entity.manager')->getStorage('block');
$blocks = $block_storage->loadByProperties(array('theme' => \Drupal::config('system.theme')->get('default')));
foreach ($blocks as $block) {
$block->delete();
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockViewBuilderTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockViewBuilderTest.php
index 71e5ff7..63bbf45 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockViewBuilderTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockViewBuilderTest.php
@@ -32,9 +32,9 @@ class BlockViewBuilderTest extends DrupalUnitTestBase {
protected $block;
/**
- * The block storage controller.
+ * The block storage.
*
- * @var \Drupal\Core\Config\Entity\ConfigStorageControllerInterface
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
*/
protected $controller;
@@ -57,7 +57,7 @@ class BlockViewBuilderTest extends DrupalUnitTestBase {
$this->controller = $this->container
->get('entity.manager')
- ->getStorageController('block');
+ ->getStorage('block');
\Drupal::state()->set('block_test.content', 'Llamas &gt; unicorns!');
diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
index ab13127..ca906ea 100644
--- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
@@ -143,7 +143,7 @@ class DisplayBlockTest extends ViewTestBase {
$this->assertBlockAppears($block_3);
$this->assertBlockAppears($block_4);
- $block_storage_controller = $this->container->get('entity.manager')->getStorageController('block');
+ $block_storage = $this->container->get('entity.manager')->getStorage('block');
// Remove the block display, so both block entities from the first view
// should both disappear.
@@ -152,10 +152,10 @@ class DisplayBlockTest extends ViewTestBase {
$view->displayHandlers->remove('block_1');
$view->storage->save();
- $this->assertFalse($block_storage_controller->load($block_1->id()), 'The block for this display was removed.');
- $this->assertFalse($block_storage_controller->load($block_2->id()), 'The block for this display was removed.');
- $this->assertTrue($block_storage_controller->load($block_3->id()), 'A block from another view was unaffected.');
- $this->assertTrue($block_storage_controller->load($block_4->id()), 'A block from another view was unaffected.');
+ $this->assertFalse($block_storage->load($block_1->id()), 'The block for this display was removed.');
+ $this->assertFalse($block_storage->load($block_2->id()), 'The block for this display was removed.');
+ $this->assertTrue($block_storage->load($block_3->id()), 'A block from another view was unaffected.');
+ $this->assertTrue($block_storage->load($block_4->id()), 'A block from another view was unaffected.');
$this->drupalGet('test-page');
$this->assertNoBlockAppears($block_1);
$this->assertNoBlockAppears($block_2);
@@ -169,8 +169,8 @@ class DisplayBlockTest extends ViewTestBase {
$view->displayHandlers->remove('block_1');
$view->storage->save();
- $this->assertFalse($block_storage_controller->load($block_3->id()), 'The block for this display was removed.');
- $this->assertTrue($block_storage_controller->load($block_4->id()), 'A block from another display on the same view was unaffected.');
+ $this->assertFalse($block_storage->load($block_3->id()), 'The block for this display was removed.');
+ $this->assertTrue($block_storage->load($block_4->id()), 'A block from another display on the same view was unaffected.');
$this->drupalGet('test-page');
$this->assertNoBlockAppears($block_3);
$this->assertBlockAppears($block_4);
@@ -190,7 +190,7 @@ class DisplayBlockTest extends ViewTestBase {
$this->assertNoFieldById('edit-machine-name', 'views_block__test_view_block_1', 'The machine name is hidden on the views block form.');
// Save the block.
$this->drupalPostForm(NULL, array(), t('Save block'));
- $storage = $this->container->get('entity.manager')->getStorageController('block');
+ $storage = $this->container->get('entity.manager')->getStorage('block');
$block = $storage->load('views_block__test_view_block_block_1');
// This will only return a result if our new block has been created with the
// expected machine name.
diff --git a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php b/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php
index aa54731..760060b 100644
--- a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php
+++ b/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php
@@ -47,7 +47,7 @@ class BlockFormControllerTest extends UnitTestCase {
->method('execute')
->will($this->returnValue(array('test', 'other_test', 'other_test_1', 'other_test_2')));
- $block_storage = $this->getMock('Drupal\Core\Config\Entity\ConfigStorageControllerInterface');
+ $block_storage = $this->getMock('Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
$block_storage->expects($this->exactly(5))
->method('getQuery')
->will($this->returnValue($query));
@@ -55,7 +55,7 @@ class BlockFormControllerTest extends UnitTestCase {
$entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
$entity_manager->expects($this->any())
- ->method('getStorageController')
+ ->method('getStorage')
->will($this->returnValue($block_storage));
$language_manager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface');
diff --git a/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php b/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php
index 0f16d1f..1f8ff83 100644
--- a/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php
+++ b/core/modules/book/lib/Drupal/book/BookBreadcrumbBuilder.php
@@ -19,9 +19,9 @@ use Drupal\node\NodeInterface;
class BookBreadcrumbBuilder extends BreadcrumbBuilderBase {
/**
- * The node storage controller.
+ * The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
@@ -50,7 +50,7 @@ class BookBreadcrumbBuilder extends BreadcrumbBuilderBase {
* The current user account.
*/
public function __construct(EntityManagerInterface $entity_manager, AccessManager $access_manager, AccountInterface $account) {
- $this->nodeStorage = $entity_manager->getStorageController('node');
+ $this->nodeStorage = $entity_manager->getStorage('node');
$this->accessManager = $access_manager;
$this->account = $account;
}
diff --git a/core/modules/book/lib/Drupal/book/BookExport.php b/core/modules/book/lib/Drupal/book/BookExport.php
index 4d220c9..b03de15 100644
--- a/core/modules/book/lib/Drupal/book/BookExport.php
+++ b/core/modules/book/lib/Drupal/book/BookExport.php
@@ -18,9 +18,9 @@ use Drupal\node\NodeInterface;
class BookExport {
/**
- * The node storage controller.
+ * The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
@@ -38,7 +38,7 @@ class BookExport {
* The entity manager.
*/
public function __construct(EntityManagerInterface $entityManager) {
- $this->nodeStorage = $entityManager->getStorageController('node');
+ $this->nodeStorage = $entityManager->getStorage('node');
$this->viewBuilder = $entityManager->getViewBuilder('node');
}
diff --git a/core/modules/book/lib/Drupal/book/BookManager.php b/core/modules/book/lib/Drupal/book/BookManager.php
index afdc638..e17f9e7 100644
--- a/core/modules/book/lib/Drupal/book/BookManager.php
+++ b/core/modules/book/lib/Drupal/book/BookManager.php
@@ -96,7 +96,7 @@ class BookManager implements BookManagerInterface {
$query->addMetaData('base_table', 'book');
$book_links = $query->execute();
- $nodes = $this->entityManager->getStorageController('node')->loadMultiple($nids);
+ $nodes = $this->entityManager->getStorage('node')->loadMultiple($nids);
// @todo: Sort by weight and translated title.
// @todo: use route name for links, not system path.
@@ -399,7 +399,7 @@ class BookManager implements BookManagerInterface {
}
}
- $nodes = $this->entityManager->getStorageController('node')->loadMultiple($nids);
+ $nodes = $this->entityManager->getStorage('node')->loadMultiple($nids);
foreach ($tree as $data) {
$nid = $data['link']['nid'];
@@ -534,7 +534,7 @@ class BookManager implements BookManagerInterface {
$element['#theme'] = 'book_link__book_toc_' . $data['link']['bid'];
$element['#attributes']['class'] = $class;
$element['#title'] = $data['link']['title'];
- $node = \Drupal::entityManager()->getStorageController('node')->load($data['link']['nid']);
+ $node = \Drupal::entityManager()->getStorage('node')->load($data['link']['nid']);
$element['#href'] = $node->url();
$element['#localized_options'] = !empty($data['link']['localized_options']) ? $data['link']['localized_options'] : array();
$element['#below'] = $data['below'] ? $this->bookTreeOutput($data['below']) : $data['below'];
@@ -937,14 +937,14 @@ class BookManager implements BookManagerInterface {
$node = NULL;
// Access will already be set in the tree functions.
if (!isset($link['access'])) {
- $node = $this->entityManager->getStorageController('node')->load($link['nid']);
+ $node = $this->entityManager->getStorage('node')->load($link['nid']);
$link['access'] = $node && $node->access('view');
}
// For performance, don't localize a link the user can't access.
if ($link['access']) {
// @todo - load the nodes en-mass rather than individually.
if (!$node) {
- $node = $this->entityManager->getStorageController('node')
+ $node = $this->entityManager->getStorage('node')
->load($link['nid']);
}
// The node label will be the value for the current user's language.
diff --git a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php
index 41eb51f..e44a2c1 100644
--- a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php
+++ b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php
@@ -9,7 +9,7 @@ namespace Drupal\book\Form;
use Drupal\book\BookManagerInterface;
use Drupal\Component\Utility\Crypt;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\FormBase;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -20,9 +20,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class BookAdminEditForm extends FormBase {
/**
- * The node storage controller.
+ * The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
@@ -36,12 +36,12 @@ class BookAdminEditForm extends FormBase {
/**
* Constructs a new BookAdminEditForm.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_storage
- * The custom block storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $node_storage
+ * The custom block storage.
* @param \Drupal\book\BookManagerInterface $book_manager
* The book manager.
*/
- public function __construct(EntityStorageControllerInterface $node_storage, BookManagerInterface $book_manager) {
+ public function __construct(EntityStorageInterface $node_storage, BookManagerInterface $book_manager) {
$this->nodeStorage = $node_storage;
$this->bookManager = $book_manager;
}
@@ -52,7 +52,7 @@ class BookAdminEditForm extends FormBase {
public static function create(ContainerInterface $container) {
$entity_manager = $container->get('entity.manager');
return new static(
- $entity_manager->getStorageController('node'),
+ $entity_manager->getStorage('node'),
$container->get('book.manager')
);
}
diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index 36f8e12..667f089 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -271,7 +271,7 @@ class BookTest extends WebTestBase {
$edit['book[pid]'] = $parent;
$this->drupalPostForm(NULL, $edit, t('Save'));
// Make sure the parent was flagged as having children.
- $parent_node = \Drupal::entityManager()->getStorageController('node')->loadUnchanged($parent);
+ $parent_node = \Drupal::entityManager()->getStorage('node')->loadUnchanged($parent);
$this->assertFalse(empty($parent_node->book['has_children']), 'Parent node is marked as having children');
}
else {
@@ -550,7 +550,7 @@ class BookTest extends WebTestBase {
$edit = array();
$edit['book[bid]'] = '1';
$this->drupalPostForm('node/' . $empty_book->id() . '/outline', $edit, t('Add to book outline'));
- $node = \Drupal::entityManager()->getStorageController('node')->load($empty_book->id());
+ $node = \Drupal::entityManager()->getStorage('node')->load($empty_book->id());
// Test the book array.
$this->assertEqual($node->book['nid'], $empty_book->id());
$this->assertEqual($node->book['bid'], $empty_book->id());
@@ -571,7 +571,7 @@ class BookTest extends WebTestBase {
$edit = array();
$edit['book[bid]'] = $node->id();
$this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
- $node = \Drupal::entityManager()->getStorageController('node')->load($node->id());
+ $node = \Drupal::entityManager()->getStorage('node')->load($node->id());
// Test the book array.
$this->assertEqual($node->book['nid'], $node->id());
diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module
index be06abd..19fe29f 100644
--- a/core/modules/breakpoint/breakpoint.module
+++ b/core/modules/breakpoint/breakpoint.module
@@ -7,7 +7,7 @@
use Drupal\breakpoint\Entity\Breakpoint;
use Drupal\breakpoint\Entity\BreakpointGroup;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
/**
* Implements hook_help().
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php
index eab45d9..e200894 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php
@@ -14,7 +14,7 @@ use Drupal\breakpoint\InvalidBreakpointNameException;
use Drupal\breakpoint\InvalidBreakpointSourceException;
use Drupal\breakpoint\InvalidBreakpointSourceTypeException;
use Drupal\breakpoint\InvalidBreakpointMediaQueryException;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines the Breakpoint entity.
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
index 738f3b2..9840657d 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
@@ -11,7 +11,7 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\breakpoint\BreakpointGroupInterface;
use Drupal\breakpoint\InvalidBreakpointSourceException;
use Drupal\breakpoint\InvalidBreakpointSourceTypeException;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines the BreakpointGroup entity.
diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install
index de9c0c8..40fb1a0 100644
--- a/core/modules/comment/comment.install
+++ b/core/modules/comment/comment.install
@@ -25,7 +25,7 @@ function comment_uninstall() {
*/
function comment_install() {
// By default, maintain entity statistics for comments.
- // @see \Drupal\comment\CommentStorageController::updateEntityStatistics().
+ // @see \Drupal\comment\CommentStorage::updateEntityStatistics().
\Drupal::state()->set('comment.maintain_entity_statistics', TRUE);
}
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 5445fb9..103c5c8 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -933,7 +933,7 @@ function comment_node_update_index(EntityInterface $node, $langcode) {
// edit could change the security situation so it is not safe to index the
// comments.
$index_comments = TRUE;
- $roles = \Drupal::entityManager()->getStorageController('user_role')->loadMultiple();
+ $roles = \Drupal::entityManager()->getStorage('user_role')->loadMultiple();
$authenticated_can_access = $roles[DRUPAL_AUTHENTICATED_RID]->hasPermission('access comments');
foreach ($roles as $rid => $role) {
if ($role->hasPermission('search content') && !$role->hasPermission('access comments')) {
diff --git a/core/modules/comment/lib/Drupal/comment/CommentBreadcrumbBuilder.php b/core/modules/comment/lib/Drupal/comment/CommentBreadcrumbBuilder.php
index d0d39bb..1c84cfa 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentBreadcrumbBuilder.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentBreadcrumbBuilder.php
@@ -51,7 +51,7 @@ class CommentBreadcrumbBuilder extends BreadcrumbBuilderBase {
$breadcrumb[] = $this->l($this->t('Home'), '<front>');
$entity = $this->entityManager
- ->getStorageController($attributes['entity_type'])
+ ->getStorage($attributes['entity_type'])
->load($attributes['entity_id']);
$uri = $entity->urlInfo();
$breadcrumb[] = \Drupal::l($entity->label(), $uri['route_name'], $uri['route_parameters'], $uri['options']);
diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
index ef7c7fd..a73ab15 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
@@ -87,7 +87,7 @@ class CommentFormController extends ContentEntityFormController {
public function form(array $form, array &$form_state) {
/** @var \Drupal\comment\CommentInterface $comment */
$comment = $this->entity;
- $entity = $this->entityManager->getStorageController($comment->getCommentedEntityTypeId())->load($comment->getCommentedEntityId());
+ $entity = $this->entityManager->getStorage($comment->getCommentedEntityTypeId())->load($comment->getCommentedEntityId());
$field_name = $comment->getFieldName();
$instance = $this->fieldInfo->getInstance($entity->getEntityTypeId(), $entity->bundle(), $field_name);
@@ -278,7 +278,7 @@ class CommentFormController extends ContentEntityFormController {
if (!empty($form_state['values']['cid'])) {
// Verify the name in case it is being changed from being anonymous.
- $accounts = $this->entityManager->getStorageController('user')->loadByProperties(array('name' => $form_state['values']['name']));
+ $accounts = $this->entityManager->getStorage('user')->loadByProperties(array('name' => $form_state['values']['name']));
$account = reset($accounts);
$form_state['values']['uid'] = $account ? $account->id() : 0;
@@ -295,7 +295,7 @@ class CommentFormController extends ContentEntityFormController {
// author of this comment was an anonymous user, verify that no registered
// user with this name exists.
if ($form_state['values']['name']) {
- $accounts = $this->entityManager->getStorageController('user')->loadByProperties(array('name' => $form_state['values']['name']));
+ $accounts = $this->entityManager->getStorage('user')->loadByProperties(array('name' => $form_state['values']['name']));
if (!empty($accounts)) {
$this->setFormError('name', $form_state, $this->t('The name you used belongs to a registered user.'));
}
diff --git a/core/modules/comment/lib/Drupal/comment/CommentManager.php b/core/modules/comment/lib/Drupal/comment/CommentManager.php
index 6976e42..5b1820c 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentManager.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentManager.php
@@ -101,7 +101,7 @@ class CommentManager implements CommentManagerInterface {
*/
public function getParentEntityUri(CommentInterface $comment) {
return $this->entityManager
- ->getStorageController($comment->getCommentedEntityTypeId())
+ ->getStorage($comment->getCommentedEntityTypeId())
->load($comment->getCommentedEntityId())
->urlInfo();
}
@@ -143,7 +143,7 @@ class CommentManager implements CommentManagerInterface {
// Make sure the field doesn't already exist.
if (!$this->fieldInfo->getField($entity_type, $field_name)) {
// Add a default comment field for existing node comments.
- $field = $this->entityManager->getStorageController('field_config')->create(array(
+ $field = $this->entityManager->getStorage('field_config')->create(array(
'entity_type' => $entity_type,
'name' => $field_name,
'type' => 'comment',
@@ -157,7 +157,7 @@ class CommentManager implements CommentManagerInterface {
}
// Make sure the instance doesn't already exist.
if (!$this->fieldInfo->getInstance($entity_type, $bundle, $field_name)) {
- $instance = $this->entityManager->getStorageController('field_instance_config')->create(array(
+ $instance = $this->entityManager->getStorage('field_instance_config')->create(array(
'label' => 'Comment settings',
'description' => '',
'field_name' => $field_name,
@@ -201,9 +201,9 @@ class CommentManager implements CommentManagerInterface {
*/
public function addBodyField($entity_type, $field_name) {
// Create the field if needed.
- $field = $this->entityManager->getStorageController('field_config')->load('comment.comment_body');
+ $field = $this->entityManager->getStorage('field_config')->load('comment.comment_body');
if (!$field) {
- $field = $this->entityManager->getStorageController('field_config')->create(array(
+ $field = $this->entityManager->getStorage('field_config')->create(array(
'name' => 'comment_body',
'type' => 'text_long',
'entity_type' => 'comment',
@@ -213,11 +213,11 @@ class CommentManager implements CommentManagerInterface {
// Create the instance if needed, field name defaults to 'comment'.
$comment_bundle = $entity_type . '__' . $field_name;
$field_instance = $this->entityManager
- ->getStorageController('field_instance_config')
+ ->getStorage('field_instance_config')
->load("comment.$comment_bundle.comment_body");
if (!$field_instance) {
// Attaches the body field by default.
- $field_instance = $this->entityManager->getStorageController('field_instance_config')->create(array(
+ $field_instance = $this->entityManager->getStorage('field_instance_config')->create(array(
'field_name' => 'comment_body',
'label' => 'Comment',
'entity_type' => 'comment',
@@ -265,7 +265,7 @@ class CommentManager implements CommentManagerInterface {
// We only output a link if we are certain that users will get the
// permission to post comments by logging in.
$this->authenticatedCanPostComments = $this->entityManager
- ->getStorageController('user_role')
+ ->getStorage('user_role')
->load(DRUPAL_AUTHENTICATED_RID)
->hasPermission('post comments');
}
diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php b/core/modules/comment/lib/Drupal/comment/CommentStorage.php
index a502732..d05b2c3 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentStorage.php
@@ -2,7 +2,7 @@
/**
* @file
- * Definition of Drupal\comment\CommentStorageController.
+ * Definition of Drupal\comment\CommentStorage.
*/
namespace Drupal\comment;
@@ -10,17 +10,17 @@ namespace Drupal\comment;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeInterface;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\field\FieldInfo;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Defines the controller class for comments.
*
- * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding
- * required special handling for comment entities.
+ * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class,
+ * adding required special handling for comment entities.
*/
-class CommentStorageController extends FieldableDatabaseStorageController implements CommentStorageControllerInterface {
+class CommentStorage extends ContentEntityDatabaseStorage implements CommentStorageInterface {
/**
* The comment statistics service.
@@ -30,7 +30,7 @@ class CommentStorageController extends FieldableDatabaseStorageController implem
protected $statistics;
/**
- * Constructs a CommentStorageController object.
+ * Constructs a CommentStorage object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_info
* An array of entity info for the entity type.
diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorageControllerInterface.php b/core/modules/comment/lib/Drupal/comment/CommentStorageInterface.php
index 4583f20..c1587a5 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentStorageControllerInterface.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentStorageInterface.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains \Drupal\comment\CommentStorageControllerInterface.
+ * Contains \Drupal\comment\CommentStorageInterface.
*/
namespace Drupal\comment;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines a common interface for comment entity controller classes.
*/
-interface CommentStorageControllerInterface extends EntityStorageControllerInterface {
+interface CommentStorageInterface extends EntityStorageInterface {
/**
* Get the maximum encoded thread value for the top level comments.
diff --git a/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php b/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php
index bd93abb..3661080 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentViewBuilder.php
@@ -98,7 +98,7 @@ class CommentViewBuilder extends EntityViewBuilder {
foreach ($entities as $entity) {
$uids[] = $entity->getOwnerId();
}
- $this->entityManager->getStorageController('user')->loadMultiple(array_unique($uids));
+ $this->entityManager->getStorage('user')->loadMultiple(array_unique($uids));
parent::buildContent($entities, $displays, $view_mode, $langcode);
@@ -111,7 +111,7 @@ class CommentViewBuilder extends EntityViewBuilder {
// Load entities in bulk. This is more performant than using
// $comment->getCommentedEntity() as we can load them in bulk per type.
foreach ($commented_entity_ids as $entity_type => $entity_ids) {
- $commented_entities[$entity_type] = $this->entityManager->getStorageController($entity_type)->loadMultiple($entity_ids);
+ $commented_entities[$entity_type] = $this->entityManager->getStorage($entity_type)->loadMultiple($entity_ids);
}
foreach ($entities as $entity) {
@@ -318,7 +318,7 @@ class CommentViewBuilder extends EntityViewBuilder {
return $element;
}
$entity = \Drupal::entityManager()
- ->getStorageController($context['entity_type'])
+ ->getStorage($context['entity_type'])
->load($context['entity_id']);
$field_name = $context['field_name'];
$query = comment_new_page_count($entity->{$field_name}->comment_count, $new, $entity);
diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
index 7a4115f..0791769 100644
--- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
+++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
@@ -119,7 +119,7 @@ class CommentController extends ControllerBase {
* The comment listing set to the page on which the comment appears.
*/
public function commentPermalink(Request $request, CommentInterface $comment) {
- if ($entity = $this->entityManager()->getStorageController($comment->getCommentedEntityTypeId())->load($comment->getCommentedEntityId())) {
+ if ($entity = $this->entityManager()->getStorage($comment->getCommentedEntityTypeId())->load($comment->getCommentedEntityId())) {
// Check access permissions for the entity.
if (!$entity->access('view')) {
throw new AccessDeniedHttpException();
@@ -208,7 +208,7 @@ class CommentController extends ControllerBase {
// Check if entity and field exists.
$fields = $this->commentManager->getFields($entity_type);
- if (empty($fields[$field_name]) || !($entity = $this->entityManager()->getStorageController($entity_type)->load($entity_id))) {
+ if (empty($fields[$field_name]) || !($entity = $this->entityManager()->getStorage($entity_type)->load($entity_id))) {
throw new NotFoundHttpException();
}
@@ -239,7 +239,7 @@ class CommentController extends ControllerBase {
return $this->redirect($uri['route_name'], $uri['route_parameters']);
}
// Load the parent comment.
- $comment = $this->entityManager()->getStorageController('comment')->load($pid);
+ $comment = $this->entityManager()->getStorage('comment')->load($pid);
// Check if the parent comment is published and belongs to the entity.
if (!$comment->isPublished() || ($comment->getCommentedEntityId() != $entity->id())) {
drupal_set_message($this->t('The comment you are replying to does not exist.'), 'error');
@@ -265,7 +265,7 @@ class CommentController extends ControllerBase {
}
// Show the actual reply box.
- $comment = $this->entityManager()->getStorageController('comment')->create(array(
+ $comment = $this->entityManager()->getStorage('comment')->create(array(
'entity_id' => $entity->id(),
'pid' => $pid,
'entity_type' => $entity->getEntityTypeId(),
diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
index 6fd4552..c5e3432 100644
--- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
@@ -10,7 +10,7 @@ namespace Drupal\comment\Entity;
use Drupal\Component\Utility\Number;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\comment\CommentInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Language\Language;
@@ -25,7 +25,7 @@ use Drupal\user\UserInterface;
* label = @Translation("Comment"),
* bundle_label = @Translation("Content type"),
* controllers = {
- * "storage" = "Drupal\comment\CommentStorageController",
+ * "storage" = "Drupal\comment\CommentStorage",
* "access" = "Drupal\comment\CommentAccessController",
* "view_builder" = "Drupal\comment\CommentViewBuilder",
* "form" = {
@@ -69,8 +69,8 @@ class Comment extends ContentEntityBase implements CommentInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
if (is_null($this->get('status')->value)) {
$published = \Drupal::currentUser()->hasPermission('skip comment approval') ? CommentInterface::PUBLISHED : CommentInterface::NOT_PUBLISHED;
@@ -89,7 +89,7 @@ class Comment extends ContentEntityBase implements CommentInterface {
if (!$this->hasParentComment()) {
// This is a comment with no parent comment (depth 0): we start
// by retrieving the maximum thread level.
- $max = $storage_controller->getMaxThread($this);
+ $max = $storage->getMaxThread($this);
// Strip the "/" from the end of the thread.
$max = rtrim($max, '/');
// We need to get the value at the correct depth.
@@ -107,7 +107,7 @@ class Comment extends ContentEntityBase implements CommentInterface {
$parent->setThread((string) rtrim((string) $parent->getThread(), '/'));
$prefix = $parent->getThread() . '.';
// Get the max value in *this* thread.
- $max = $storage_controller->getMaxThreadPerThread($this);
+ $max = $storage->getMaxThreadPerThread($this);
if ($max == '') {
// First child of this parent. As the other two cases do an
@@ -147,12 +147,12 @@ class Comment extends ContentEntityBase implements CommentInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
$this->releaseThreadLock();
// Update the {comment_entity_statistics} table prior to executing the hook.
- $storage_controller->updateEntityStatistics($this);
+ $storage->updateEntityStatistics($this);
if ($this->isPublished()) {
\Drupal::moduleHandler()->invokeAll('comment_publish', array($this));
}
@@ -171,14 +171,14 @@ class Comment extends ContentEntityBase implements CommentInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
- $child_cids = $storage_controller->getChildCids($entities);
+ $child_cids = $storage->getChildCids($entities);
entity_delete_multiple('comment', $child_cids);
foreach ($entities as $id => $entity) {
- $storage_controller->updateEntityStatistics($entity);
+ $storage->updateEntityStatistics($entity);
}
}
@@ -503,7 +503,7 @@ class Comment extends ContentEntityBase implements CommentInterface {
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
if (empty($values['field_id']) && !empty($values['field_name']) && !empty($values['entity_type'])) {
$values['field_id'] = $values['entity_type'] . '__' . $values['field_name'];
}
diff --git a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
index e2ce52a..9b54bf1 100644
--- a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
+++ b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
@@ -8,7 +8,7 @@
namespace Drupal\comment\Form;
use Drupal\comment\CommentInterface;
-use Drupal\comment\CommentStorageControllerInterface;
+use Drupal\comment\CommentStorageInterface;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Datetime\Date;
@@ -32,7 +32,7 @@ class CommentAdminOverview extends FormBase {
/**
* The comment storage.
*
- * @var \Drupal\comment\CommentStorageControllerInterface
+ * @var \Drupal\comment\CommentStorageInterface
*/
protected $commentStorage;
@@ -55,14 +55,14 @@ class CommentAdminOverview extends FormBase {
*
* @param \Drupal\Core\Entity\EntityManager $entity_manager
* The entity manager service.
- * @param \Drupal\comment\CommentStorageControllerInterface $comment_storage
+ * @param \Drupal\comment\CommentStorageInterface $comment_storage
* The comment storage.
* @param \Drupal\Core\Datetime\Date $date
* The date service.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
*/
- public function __construct(EntityManager $entity_manager, CommentStorageControllerInterface $comment_storage, Date $date, ModuleHandlerInterface $module_handler) {
+ public function __construct(EntityManager $entity_manager, CommentStorageInterface $comment_storage, Date $date, ModuleHandlerInterface $module_handler) {
$this->entityManager = $entity_manager;
$this->commentStorage = $comment_storage;
$this->date = $date;
@@ -75,7 +75,7 @@ class CommentAdminOverview extends FormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity.manager'),
- $container->get('entity.manager')->getStorageController('comment'),
+ $container->get('entity.manager')->getStorage('comment'),
$container->get('date'),
$container->get('module_handler')
);
@@ -176,7 +176,7 @@ class CommentAdminOverview extends FormBase {
}
foreach ($commented_entity_ids as $entity_type => $ids) {
- $commented_entities[$entity_type] = $this->entityManager->getStorageController($entity_type)->loadMultiple($ids);
+ $commented_entities[$entity_type] = $this->entityManager->getStorage($entity_type)->loadMultiple($ids);
}
foreach ($comments as $comment) {
diff --git a/core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php b/core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php
index 0de4b8b..4598bd0 100644
--- a/core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php
+++ b/core/modules/comment/lib/Drupal/comment/Form/ConfirmDeleteMultiple.php
@@ -7,7 +7,7 @@
namespace Drupal\comment\Form;
-use Drupal\comment\CommentStorageControllerInterface;
+use Drupal\comment\CommentStorageInterface;
use Drupal\Component\Utility\String;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Form\ConfirmFormBase;
@@ -21,7 +21,7 @@ class ConfirmDeleteMultiple extends ConfirmFormBase {
/**
* The comment storage.
*
- * @var \Drupal\comment\CommentStorageControllerInterface
+ * @var \Drupal\comment\CommentStorageInterface
*/
protected $commentStorage;
@@ -35,10 +35,10 @@ class ConfirmDeleteMultiple extends ConfirmFormBase {
/**
* Creates an new ConfirmDeleteMultiple form.
*
- * @param \Drupal\comment\CommentStorageControllerInterface $comment_storage
+ * @param \Drupal\comment\CommentStorageInterface $comment_storage
* The comment storage.
*/
- public function __construct(CommentStorageControllerInterface $comment_storage) {
+ public function __construct(CommentStorageInterface $comment_storage) {
$this->commentStorage = $comment_storage;
}
@@ -47,7 +47,7 @@ class ConfirmDeleteMultiple extends ConfirmFormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('comment')
+ $container->get('entity.manager')->getStorage('comment')
);
}
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
index 0320083..1832e32 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\Field\FieldFormatter;
-use Drupal\comment\CommentStorageControllerInterface;
+use Drupal\comment\CommentStorageInterface;
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
use Drupal\Core\Entity\EntityViewBuilderInterface;
use Drupal\Core\Field\FieldItemListInterface;
@@ -44,11 +44,11 @@ class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryP
}
/**
- * The comment storage controller.
+ * The comment storage.
*
- * @var \Drupal\comment\CommentStorageControllerInterface
+ * @var \Drupal\comment\CommentStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* The current user.
@@ -76,7 +76,7 @@ class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryP
$configuration['label'],
$configuration['view_mode'],
$container->get('current_user'),
- $container->get('entity.manager')->getStorageController('comment'),
+ $container->get('entity.manager')->getStorage('comment'),
$container->get('entity.manager')->getViewBuilder('comment')
);
}
@@ -98,15 +98,15 @@ class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryP
* The view mode.
* @param \Drupal\Core\Session\AccountInterface $current_user
* The current user.
- * @param \Drupal\comment\CommentStorageControllerInterface $comment_storage_controller
- * The comment storage controller.
+ * @param \Drupal\comment\CommentStorageInterface $comment_storage
+ * The comment storage.
* @param \Drupal\Core\Entity\EntityViewBuilderInterface $comment_view_builder
* The comment view builder.
*/
- public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, AccountInterface $current_user, CommentStorageControllerInterface $comment_storage_controller, EntityViewBuilderInterface $comment_view_builder) {
+ public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, AccountInterface $current_user, CommentStorageInterface $comment_storage, EntityViewBuilderInterface $comment_view_builder) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode);
$this->viewBuilder = $comment_view_builder;
- $this->storageController = $comment_storage_controller;
+ $this->storage = $comment_storage;
$this->currentUser = $current_user;
}
@@ -138,7 +138,7 @@ class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryP
$mode = $comment_settings['default_mode'];
$comments_per_page = $comment_settings['per_page'];
if ($cids = comment_get_thread($entity, $field_name, $mode, $comments_per_page, $this->getSetting('pager_id'))) {
- $comments = $this->storageController->loadMultiple($cids);
+ $comments = $this->storage->loadMultiple($cids);
comment_prepare_thread($comments);
$build = $this->viewBuilder->viewMultiple($comments);
$build['pager']['#theme'] = 'pager';
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Validation/Constraint/CommentNameConstraintValidator.php b/core/modules/comment/lib/Drupal/comment/Plugin/Validation/Constraint/CommentNameConstraintValidator.php
index f1e6c1c..0bb45da 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Validation/Constraint/CommentNameConstraintValidator.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Validation/Constraint/CommentNameConstraintValidator.php
@@ -25,7 +25,7 @@ class CommentNameConstraintValidator extends ConstraintValidator {
// taken by a registered user.
if ($field_item->getEntity()->getOwnerId() === 0) {
// @todo Properly inject dependency https://drupal.org/node/2197029
- $users = \Drupal::entityManager()->getStorageController('user')->loadByProperties(array('name' => $author_name));
+ $users = \Drupal::entityManager()->getStorage('user')->loadByProperties(array('name' => $author_name));
if (!empty($users)) {
$this->context->addViolation($constraint->message, array('%name' => $author_name));
}
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php
index ba7aae4..881c965 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php
@@ -46,33 +46,33 @@ class CommentValidationTest extends EntityUnitTestBase {
*/
public function testValidation() {
// Add comment field to content.
- $this->entityManager->getStorageController('field_config')->create(array(
+ $this->entityManager->getStorage('field_config')->create(array(
'entity_type' => 'node',
'name' => 'comment',
'type' => 'comment',
))->save();
// Create a page node type.
- $this->entityManager->getStorageController('node_type')->create(array(
+ $this->entityManager->getStorage('node_type')->create(array(
'type' => 'page',
'name' => 'page',
))->save();
// Add comment field instance to page content.
- $this->entityManager->getStorageController('field_instance_config')->create(array(
+ $this->entityManager->getStorage('field_instance_config')->create(array(
'field_name' => 'comment',
'entity_type' => 'node',
'bundle' => 'page',
'label' => 'Comment settings',
))->save();
- $node = $this->entityManager->getStorageController('node')->create(array(
+ $node = $this->entityManager->getStorage('node')->create(array(
'type' => 'page',
'title' => 'test',
));
$node->save();
- $comment = $this->entityManager->getStorageController('comment')->create(array(
+ $comment = $this->entityManager->getStorage('comment')->create(array(
'entity_id' => $node->id(),
'entity_type' => 'node',
'field_name' => 'comment',
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php
index 5b0e8e6..fad5f36 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php
@@ -8,7 +8,6 @@
namespace Drupal\comment\Tests\Views;
use Drupal\comment\CommentInterface;
-use Drupal\entity\DatabaseStorageController;
use Drupal\views\Views;
use Drupal\views\Tests\ViewTestBase;
diff --git a/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php b/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php
index 1d54be4..5ba7f5e 100644
--- a/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php
+++ b/core/modules/comment/tests/Drupal/comment/Tests/Entity/CommentLockTest.php
@@ -78,9 +78,9 @@ class CommentLockTest extends UnitTestCase {
->method('get')
->with('status')
->will($this->returnValue((object) array('value' => NULL)));
- $storage_controller = $this->getMock('Drupal\comment\CommentStorageControllerInterface');
- $comment->preSave($storage_controller);
- $comment->postSave($storage_controller);
+ $storage = $this->getMock('Drupal\comment\CommentStorageInterface');
+ $comment->preSave($storage);
+ $comment->postSave($storage);
}
}
diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigSingleExportForm.php b/core/modules/config/lib/Drupal/config/Form/ConfigSingleExportForm.php
index c3b505e..101dacb 100644
--- a/core/modules/config/lib/Drupal/config/Form/ConfigSingleExportForm.php
+++ b/core/modules/config/lib/Drupal/config/Form/ConfigSingleExportForm.php
@@ -166,7 +166,7 @@ class ConfigSingleExportForm extends FormBase {
);
// For a given entity type, load all entities.
if ($config_type && $config_type !== 'system.simple') {
- $entity_storage = $this->entityManager->getStorageController($config_type);
+ $entity_storage = $this->entityManager->getStorage($config_type);
foreach ($entity_storage->loadMultiple() as $entity) {
$entity_id = $entity->id();
$label = $entity->label() ?: $entity_id;
diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigSingleImportForm.php b/core/modules/config/lib/Drupal/config/Form/ConfigSingleImportForm.php
index 434745e..b757be6 100644
--- a/core/modules/config/lib/Drupal/config/Form/ConfigSingleImportForm.php
+++ b/core/modules/config/lib/Drupal/config/Form/ConfigSingleImportForm.php
@@ -181,7 +181,7 @@ class ConfigSingleImportForm extends ConfirmFormBase {
if ($form_state['values']['config_type'] !== 'system.simple') {
$definition = $this->entityManager->getDefinition($form_state['values']['config_type']);
$id_key = $definition->getKey('id');
- $entity_storage = $this->entityManager->getStorageController($form_state['values']['config_type']);
+ $entity_storage = $this->entityManager->getStorage($form_state['values']['config_type']);
// If an entity ID was not specified, set an error.
if (!isset($data[$id_key])) {
$this->setFormError('import', $form_state, $this->t('Missing ID key "@id_key" for this @entity_type import.', array('@id_key' => $id_key, '@entity_type' => $definition->getLabel())));
@@ -233,7 +233,7 @@ class ConfigSingleImportForm extends ConfirmFormBase {
else {
try {
$entity = $this->entityManager
- ->getStorageController($this->data['config_type'])
+ ->getStorage($this->data['config_type'])
->create($this->data['import']);
$entity->save();
drupal_set_message($this->t('The @entity_type %label was imported.', array('@entity_type' => $entity->getEntityTypeId(), '%label' => $entity->label())));
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigDependencyTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigDependencyTest.php
index f35d9f4..0cb93e8 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigDependencyTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigDependencyTest.php
@@ -48,7 +48,7 @@ class ConfigDependencyTest extends DrupalUnitTestBase {
*/
public function testDependencyMangement() {
$config_manager = \Drupal::service('config.manager');
- $storage = $this->container->get('entity.manager')->getStorageController('config_test');
+ $storage = $this->container->get('entity.manager')->getStorage('config_test');
// Test dependencies between modules.
$entity1 = $storage->create(
array(
@@ -118,7 +118,7 @@ class ConfigDependencyTest extends DrupalUnitTestBase {
// Create a configuration entity of a different type with the same ID as one
// of the entities already created.
- $alt_storage = $this->container->get('entity.manager')->getStorageController('config_query_test');
+ $alt_storage = $this->container->get('entity.manager')->getStorage('config_query_test');
$alt_storage->create(array('id' => 'entity1', 'test_dependencies' => array('entity' => array($entity1->getConfigDependencyName()))))->save();
$alt_storage->create(array('id' => 'entity2', 'test_dependencies' => array('module' => array('views'))))->save();
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php
index 710cc0d..33ec8ca 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php
@@ -9,7 +9,7 @@ namespace Drupal\config\Tests;
use Drupal\simpletest\WebTestBase;
use Drupal\config_test\Entity\ConfigTest;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Tests the listing of configuration entities.
@@ -37,8 +37,8 @@ class ConfigEntityListTest extends WebTestBase {
function testList() {
$controller = \Drupal::entityManager()->getListBuilder('config_test');
- // Test getStorageController() method.
- $this->assertTrue($controller->getStorageController() instanceof EntityStorageControllerInterface, 'EntityStorageController instance in storage.');
+ // Test getStorage() method.
+ $this->assertTrue($controller->getStorage() instanceof EntityStorageInterface, 'EntityStorage instance in storage.');
// Get a list of ConfigTest entities and confirm that it contains the
// ConfigTest entity provided by the config_test module.
@@ -91,20 +91,20 @@ class ConfigEntityListTest extends WebTestBase {
$actual_items = $controller->buildRow($entity);
$this->assertIdentical($expected_items, $actual_items, 'Return value from buildRow matches expected.');
// Test sorting.
- $storage_controller = $controller->getStorageController();
- $entity = $storage_controller->create(array(
+ $storage = $controller->getStorage();
+ $entity = $storage->create(array(
'id' => 'alpha',
'label' => 'Alpha',
'weight' => 1,
));
$entity->save();
- $entity = $storage_controller->create(array(
+ $entity = $storage->create(array(
'id' => 'omega',
'label' => 'Omega',
'weight' => 1,
));
$entity->save();
- $entity = $storage_controller->create(array(
+ $entity = $storage->create(array(
'id' => 'beta',
'label' => 'Beta',
'weight' => 0,
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStorageControllerTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStorageTest.php
index 12a1ede..854882e 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStorageControllerTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStorageTest.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\config\Tests\ConfigEntityStorageControllerTest.
+ * Contains \Drupal\config\Tests\ConfigEntityStorageTest.
*/
namespace Drupal\config\Tests;
@@ -13,7 +13,7 @@ use Drupal\Core\Config\ConfigDuplicateUUIDException;
/**
* Tests importing config entity data when the ID or UUID matches existing data.
*/
-class ConfigEntityStorageControllerTest extends DrupalUnitTestBase {
+class ConfigEntityStorageTest extends DrupalUnitTestBase {
/**
* Modules to enable.
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
index 7ec5e86..9800827 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
@@ -23,9 +23,9 @@ class ConfigEntityUnitTest extends DrupalUnitTestBase {
public static $modules = array('config_test');
/**
- * The config_test entity storage controller.
+ * The config_test entity storage.
*
- * @var \Drupal\Core\Config\Entity\ConfigStorageControllerInterface
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
*/
protected $storage;
@@ -42,13 +42,13 @@ class ConfigEntityUnitTest extends DrupalUnitTestBase {
*/
protected function setUp() {
parent::setUp();
- $this->storage = $this->container->get('entity.manager')->getStorageController('config_test');
+ $this->storage = $this->container->get('entity.manager')->getStorage('config_test');
}
/**
- * Tests storage controller methods.
+ * Tests storage methods.
*/
- public function testStorageControllerMethods() {
+ public function testStorageMethods() {
$entity_type = \Drupal::entityManager()->getDefinition('config_test');
$expected = $entity_type->getConfigPrefix() . '.';
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php
index 8bd1b72..718878b 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php
@@ -34,7 +34,7 @@ class ConfigSingleImportExportTest extends WebTestBase {
* Tests importing a single configuration file.
*/
public function testImport() {
- $storage = \Drupal::entityManager()->getStorageController('config_test');
+ $storage = \Drupal::entityManager()->getStorage('config_test');
$uuid = \Drupal::service('uuid');
$this->drupalLogin($this->drupalCreateUser(array('import configuration')));
@@ -143,7 +143,7 @@ EOD;
$this->drupalGet('admin/config/development/configuration/single/export/date_format/fallback');
$this->assertFieldByXPath('//select[@name="config_name"]//option[@selected="selected"]', t('Fallback date format'), 'The fallback date format config entity is selected when specified in the URL.');
- $fallback_date = \Drupal::entityManager()->getStorageController('date_format')->load('fallback');
+ $fallback_date = \Drupal::entityManager()->getStorage('date_format')->load('fallback');
$data = \Drupal::service('config.storage')->encode($fallback_date->toArray());
$this->assertFieldByXPath('//textarea[@name="export"]', $data, 'The fallback date format config entity export code is displayed.');
}
diff --git a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
index d986835..140b50a 100644
--- a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
+++ b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
@@ -10,21 +10,21 @@ namespace Drupal\config\Tests\Storage;
use Drupal\simpletest\DrupalUnitTestBase;
/**
- * Base class for testing storage controller operations.
+ * Base class for testing storage operations.
*
- * All configuration storage controllers are expected to behave identically in
+ * All configuration storages are expected to behave identically in
* terms of reading, writing, listing, deleting, as well as error handling.
*
- * Therefore, storage controller tests use a uncommon test case class structure;
+ * Therefore, storage tests use a uncommon test case class structure;
* the base class defines the test method(s) to execute, which are identical for
- * all storage controllers. The storage controller specific test case classes
+ * all storages. The storage specific test case classes
* supply the necessary helper methods to interact with the raw/native storage
* directly.
*/
abstract class ConfigStorageTestBase extends DrupalUnitTestBase {
/**
- * Tests storage controller CRUD operations.
+ * Tests storage CRUD operations.
*
* @todo Coverage: Trigger PDOExceptions / Database exceptions.
* @todo Coverage: Trigger Yaml's ParseException and DumpException.
@@ -162,7 +162,7 @@ abstract class ConfigStorageTestBase extends DrupalUnitTestBase {
}
/**
- * Tests storage controller writing and reading data preserving data type.
+ * Tests storage writing and reading data preserving data type.
*/
function testDataTypes() {
$name = 'config_test.types';
diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestStorageController.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestStorage.php
index a73cffb..38f769a 100644
--- a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestStorageController.php
+++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestStorage.php
@@ -2,21 +2,21 @@
/**
* @file
- * Contains \Drupal\config_test\ConfigTestStorageController.
+ * Contains \Drupal\config_test\ConfigTestStorage.
*/
namespace Drupal\config_test;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
use Drupal\Core\Config\Config;
/**
* @todo.
*/
-class ConfigTestStorageController extends ConfigStorageController {
+class ConfigTestStorage extends ConfigEntityStorage {
/**
- * Overrides \Drupal\Core\Config\Entity\ConfigStorageController::importCreate().
+ * Overrides \Drupal\Core\Config\Entity\ConfigEntityStorage::importCreate().
*/
public function importCreate($name, Config $new_config, Config $old_config) {
// Set a global value we can check in test code.
@@ -26,7 +26,7 @@ class ConfigTestStorageController extends ConfigStorageController {
}
/**
- * Overrides \Drupal\Core\Config\Entity\ConfigStorageController::importUpdate().
+ * Overrides \Drupal\Core\Config\Entity\ConfigEntityStorage::importUpdate().
*/
public function importUpdate($name, Config $new_config, Config $old_config) {
// Set a global value we can check in test code.
@@ -36,7 +36,7 @@ class ConfigTestStorageController extends ConfigStorageController {
}
/**
- * Overrides \Drupal\Core\Config\Entity\ConfigStorageController::importDelete().
+ * Overrides \Drupal\Core\Config\Entity\ConfigEntityStorage::importDelete().
*/
public function importDelete($name, Config $new_config, Config $old_config) {
// Set a global value we can check in test code.
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 53cd76d..ef760dd 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
@@ -14,7 +14,7 @@ namespace Drupal\config_test\Entity;
* id = "config_query_test",
* label = @Translation("Test configuration for query"),
* controllers = {
- * "storage" = "Drupal\config_test\ConfigTestStorageController",
+ * "storage" = "Drupal\config_test\ConfigTestStorage",
* "list_builder" = "Drupal\Core\Config\Entity\ConfigEntityListBuilder",
* "form" = {
* "default" = "Drupal\config_test\ConfigTestFormController"
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 b8d2c56..d5217bf 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,7 @@ use Drupal\Core\Config\Entity\ConfigEntityInterface;
* id = "config_test",
* label = @Translation("Test configuration"),
* controllers = {
- * "storage" = "Drupal\config_test\ConfigTestStorageController",
+ * "storage" = "Drupal\config_test\ConfigTestStorage",
* "list_builder" = "Drupal\config_test\ConfigTestListBuilder",
* "form" = {
* "default" = "Drupal\config_test\ConfigTestFormController",
diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListBuilder.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListBuilder.php
index 90d61bb..332f894 100644
--- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListBuilder.php
+++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListBuilder.php
@@ -9,7 +9,7 @@ namespace Drupal\config_translation\Controller;
use Drupal\Component\Utility\String;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Extension\ThemeHandlerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -29,7 +29,7 @@ class ConfigTranslationBlockListBuilder extends ConfigTranslationEntityListBuild
/**
* {@inheritdoc}
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, ThemeHandlerInterface $theme_handler) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ThemeHandlerInterface $theme_handler) {
parent::__construct($entity_type, $storage);
$this->themes = $theme_handler->listInfo();
}
@@ -40,7 +40,7 @@ class ConfigTranslationBlockListBuilder extends ConfigTranslationEntityListBuild
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('theme_handler')
);
}
diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListBuilder.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListBuilder.php
index c2372d9..e58947a 100644
--- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListBuilder.php
+++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListBuilder.php
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\String;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\field\Field;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -56,7 +56,7 @@ class ConfigTranslationFieldInstanceListBuilder extends ConfigTranslationEntityL
$entity_manager = $container->get('entity.manager');
return new static(
$entity_type,
- $entity_manager->getStorageController($entity_type->id()),
+ $entity_manager->getStorage($entity_type->id()),
$entity_manager
);
}
@@ -66,12 +66,12 @@ class ConfigTranslationFieldInstanceListBuilder extends ConfigTranslationEntityL
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, EntityManagerInterface $entity_manager) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, EntityManagerInterface $entity_manager) {
parent::__construct($entity_type, $storage);
$this->entityManager = $entity_manager;
}
diff --git a/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php b/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php
index bd7bdd7..4c7a58e 100644
--- a/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php
+++ b/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php
@@ -69,7 +69,7 @@ class ContactController extends ControllerBase {
// Use the default category if no category has been passed.
if (empty($contact_category)) {
$contact_category = $this->entityManager()
- ->getStorageController('contact_category')
+ ->getStorage('contact_category')
->load($this->config('contact.settings')->get('default_category'));
// If there are no categories, do not display the form.
if (empty($contact_category)) {
@@ -85,7 +85,7 @@ class ContactController extends ControllerBase {
}
$message = $this->entityManager()
- ->getStorageController('contact_message')
+ ->getStorage('contact_message')
->create(array(
'category' => $contact_category->id(),
));
@@ -110,7 +110,7 @@ class ContactController extends ControllerBase {
$this->contactFloodControl();
}
- $message = $this->entityManager()->getStorageController('contact_message')->create(array(
+ $message = $this->entityManager()->getStorage('contact_message')->create(array(
'category' => 'personal',
'recipient' => $user->id(),
));
diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Category.php b/core/modules/contact/lib/Drupal/contact/Entity/Category.php
index 0fc1d7d..6f0222d 100644
--- a/core/modules/contact/lib/Drupal/contact/Entity/Category.php
+++ b/core/modules/contact/lib/Drupal/contact/Entity/Category.php
@@ -8,7 +8,7 @@
namespace Drupal\contact\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\contact\CategoryInterface;
/**
@@ -79,8 +79,8 @@ class Category extends ConfigEntityBase implements CategoryInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if (!$update) {
entity_invoke_bundle_hook('create', 'contact_message', $this->id());
@@ -93,8 +93,8 @@ class Category extends ConfigEntityBase implements CategoryInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
foreach ($entities as $entity) {
entity_invoke_bundle_hook('delete', 'contact_message', $entity->id());
diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Message.php b/core/modules/contact/lib/Drupal/contact/Entity/Message.php
index a3a62cb..ff35420 100644
--- a/core/modules/contact/lib/Drupal/contact/Entity/Message.php
+++ b/core/modules/contact/lib/Drupal/contact/Entity/Message.php
@@ -19,7 +19,7 @@ use Drupal\Core\Field\FieldDefinition;
* id = "contact_message",
* label = @Translation("Contact message"),
* controllers = {
- * "storage" = "Drupal\Core\Entity\FieldableNullStorageController",
+ * "storage" = "Drupal\Core\Entity\ContentEntityNullStorage",
* "view_builder" = "Drupal\contact\MessageViewBuilder",
* "form" = {
* "default" = "Drupal\contact\MessageFormController"
diff --git a/core/modules/contact/lib/Drupal/contact/Tests/MessageEntityTest.php b/core/modules/contact/lib/Drupal/contact/Tests/MessageEntityTest.php
index fd5300b..489c5de 100644
--- a/core/modules/contact/lib/Drupal/contact/Tests/MessageEntityTest.php
+++ b/core/modules/contact/lib/Drupal/contact/Tests/MessageEntityTest.php
@@ -40,7 +40,7 @@ class MessageEntityTest extends DrupalUnitTestBase {
* Test some of the methods.
*/
public function testMessageMethods() {
- $message_storage = $this->container->get('entity.manager')->getStorageController('contact_message');
+ $message_storage = $this->container->get('entity.manager')->getStorage('contact_message');
$message = $message_storage->create(array('category' => 'feedback'));
// Check for empty values first.
diff --git a/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php b/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php
index 128d5ec..28216aa 100644
--- a/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php
+++ b/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php
@@ -7,7 +7,7 @@
namespace Drupal\contact\Tests\Views;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\views\Tests\ViewTestBase;
/**
@@ -67,7 +67,7 @@ class ContactFieldsTest extends ViewTestBase {
public function testViewsData() {
// Test that the field is not exposed to views, since contact_message
// entities have no storage.
- $table_name = FieldableDatabaseStorageController::_fieldTableName($this->field);
+ $table_name = ContentEntityDatabaseStorage::_fieldTableName($this->field);
$data = $this->container->get('views.views_data')->get($table_name);
$this->assertFalse($data, 'The field is not exposed to Views.');
}
diff --git a/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php b/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php
index 1c8db66..d041976 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php
@@ -48,7 +48,7 @@ class FieldTranslationSynchronizer implements FieldTranslationSynchronizerInterf
// If the entity language is being changed there is nothing to synchronize.
$entity_type = $entity->getEntityTypeId();
- $entity_unchanged = isset($entity->original) ? $entity->original : $this->entityManager->getStorageController($entity_type)->loadUnchanged($entity->id());
+ $entity_unchanged = isset($entity->original) ? $entity->original : $this->entityManager->getStorage($entity_type)->loadUnchanged($entity->id());
if ($entity->getUntranslated()->language()->id != $entity_unchanged->getUntranslated()->language()->id) {
return;
}
diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php
index 09afe8c..250b10a 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php
@@ -7,7 +7,7 @@
namespace Drupal\content_translation\Tests;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\Core\Language\Language;
use Drupal\simpletest\WebTestBase;
@@ -217,8 +217,8 @@ abstract class ContentTranslationTestBase extends WebTestBase {
if ($bundle_key = $entity_type->getKey('bundle')) {
$entity_values[$bundle_key] = $bundle_name ?: $this->bundle;
}
- $controller = $this->container->get('entity.manager')->getStorageController($this->entityTypeId);
- if (!($controller instanceof FieldableDatabaseStorageController)) {
+ $controller = $this->container->get('entity.manager')->getStorage($this->entityTypeId);
+ if (!($controller instanceof ContentEntityDatabaseStorage)) {
foreach ($values as $property => $value) {
if (is_array($value)) {
$entity_values[$property] = array($langcode => $value);
diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php
index 3680072..c26e8be 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php
@@ -9,7 +9,7 @@ namespace Drupal\datetime\Plugin\Field\FieldFormatter;
use Drupal\Core\Datetime\Date;
use Drupal\Core\Datetime\DrupalDateTime;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -46,9 +46,9 @@ class DateTimeDefaultFormatter extends FormatterBase implements ContainerFactory
protected $dateService;
/**
- * The date storage controller.
+ * The date storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $dateStorage;
@@ -69,10 +69,10 @@ class DateTimeDefaultFormatter extends FormatterBase implements ContainerFactory
* The view mode.
* @param \Drupal\Core\Datetime\Date $date_service
* The date service.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $date_storage
- * The date storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $date_storage
+ * The date storage.
*/
- public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, Date $date_service, EntityStorageControllerInterface $date_storage) {
+ public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, Date $date_service, EntityStorageInterface $date_storage) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode);
$this->dateService = $date_service;
@@ -91,7 +91,7 @@ class DateTimeDefaultFormatter extends FormatterBase implements ContainerFactory
$configuration['label'],
$configuration['view_mode'],
$container->get('date'),
- $container->get('entity.manager')->getStorageController('date_format')
+ $container->get('entity.manager')->getStorage('date_format')
);
}
diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php
index 9389a71..29cd79d 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php
@@ -27,7 +27,7 @@ class DateTimeDefaultWidget extends WidgetBase {
/**
* The date format storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $dateStorage;
@@ -38,7 +38,7 @@ class DateTimeDefaultWidget extends WidgetBase {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings);
// @todo Inject this once https://drupal.org/node/2035317 is in.
- $this->dateStorage = \Drupal::entityManager()->getStorageController('date_format');
+ $this->dateStorage = \Drupal::entityManager()->getStorage('date_format');
}
/**
diff --git a/core/modules/edit/lib/Drupal/edit/Access/EditEntityAccessCheck.php b/core/modules/edit/lib/Drupal/edit/Access/EditEntityAccessCheck.php
index 3c6dbcd..29c2d27 100644
--- a/core/modules/edit/lib/Drupal/edit/Access/EditEntityAccessCheck.php
+++ b/core/modules/edit/lib/Drupal/edit/Access/EditEntityAccessCheck.php
@@ -69,7 +69,7 @@ class EditEntityAccessCheck implements AccessInterface {
if (!$entity_type || !$this->entityManager->getDefinition($entity_type)) {
return FALSE;
}
- $entity = $this->entityManager->getStorageController($entity_type)->load($entity_id);
+ $entity = $this->entityManager->getStorage($entity_type)->load($entity_id);
if (!$entity) {
return FALSE;
}
diff --git a/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php b/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php
index 50aaf64..01b2868 100644
--- a/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php
+++ b/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php
@@ -68,7 +68,7 @@ class EditEntityFieldAccessCheck implements AccessInterface, EditEntityFieldAcce
if (!$entity_type || !$this->entityManager->getDefinition($entity_type)) {
return FALSE;
}
- $entity = $this->entityManager->getStorageController($entity_type)->load($entity_id);
+ $entity = $this->entityManager->getStorage($entity_type)->load($entity_id);
if (!$entity) {
return FALSE;
}
diff --git a/core/modules/edit/lib/Drupal/edit/EditController.php b/core/modules/edit/lib/Drupal/edit/EditController.php
index a086d93..c977f31 100644
--- a/core/modules/edit/lib/Drupal/edit/EditController.php
+++ b/core/modules/edit/lib/Drupal/edit/EditController.php
@@ -110,7 +110,7 @@ class EditController extends ControllerBase {
if (!$entity_type || !$this->entityManager()->getDefinition($entity_type)) {
throw new NotFoundHttpException();
}
- $entity = $this->entityManager()->getStorageController($entity_type)->load($entity_id);
+ $entity = $this->entityManager()->getStorage($entity_type)->load($entity_id);
if (!$entity) {
throw new NotFoundHttpException();
}
diff --git a/core/modules/edit/lib/Drupal/edit/Form/EditFieldForm.php b/core/modules/edit/lib/Drupal/edit/Form/EditFieldForm.php
index c084fd9..13bf441 100644
--- a/core/modules/edit/lib/Drupal/edit/Form/EditFieldForm.php
+++ b/core/modules/edit/lib/Drupal/edit/Form/EditFieldForm.php
@@ -9,7 +9,7 @@ namespace Drupal\edit\Form;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Form\FormBase;
@@ -39,7 +39,7 @@ class EditFieldForm extends FormBase {
/**
* The node type storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeTypeStorage;
@@ -50,10 +50,10 @@ class EditFieldForm extends FormBase {
* The tempstore factory.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_type_storage
+ * @param \Drupal\Core\Entity\EntityStorageInterface $node_type_storage
* The node type storage.
*/
- public function __construct(TempStoreFactory $temp_store_factory, ModuleHandlerInterface $module_handler, EntityStorageControllerInterface $node_type_storage) {
+ public function __construct(TempStoreFactory $temp_store_factory, ModuleHandlerInterface $module_handler, EntityStorageInterface $node_type_storage) {
$this->moduleHandler = $module_handler;
$this->nodeTypeStorage = $node_type_storage;
$this->tempStoreFactory = $temp_store_factory;
@@ -66,7 +66,7 @@ class EditFieldForm extends FormBase {
return new static(
$container->get('user.tempstore'),
$container->get('module_handler'),
- $container->get('entity.manager')->getStorageController('node_type')
+ $container->get('entity.manager')->getStorage('node_type')
);
}
diff --git a/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityAccessCheckTest.php b/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityAccessCheckTest.php
index 9e8d050..bbbf597 100644
--- a/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityAccessCheckTest.php
+++ b/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityAccessCheckTest.php
@@ -39,11 +39,11 @@ class EditEntityAccessCheckTest extends UnitTestCase {
protected $entityManager;
/**
- * The mocked entity storage controller.
+ * The mocked entity storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface|\PHPUnit_Framework_MockObject_MockObject
+ * @var \Drupal\Core\Entity\EntityStorageInterface|\PHPUnit_Framework_MockObject_MockObject
*/
- protected $entityStorageController;
+ protected $entityStorage;
public static function getInfo() {
return array(
@@ -56,11 +56,11 @@ class EditEntityAccessCheckTest extends UnitTestCase {
protected function setUp() {
$this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
- $this->entityStorageController = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
+ $this->entityStorage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
$this->entityManager->expects($this->any())
- ->method('getStorageController')
- ->will($this->returnValue($this->entityStorageController));
+ ->method('getStorage')
+ ->will($this->returnValue($this->entityStorage));
$this->editAccessCheck = new EditEntityAccessCheck($this->entityManager);
}
@@ -146,7 +146,7 @@ class EditEntityAccessCheckTest extends UnitTestCase {
->with('entity_test')
->will($this->returnValue(array('id' => 'entity_test')));
- $this->entityStorageController->expects($this->once())
+ $this->entityStorage->expects($this->once())
->method('load')
->with(1)
->will($this->returnValue(NULL));
diff --git a/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityFieldAccessCheckTest.php b/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityFieldAccessCheckTest.php
index 1e33123..92d763f 100644
--- a/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityFieldAccessCheckTest.php
+++ b/core/modules/edit/tests/Drupal/edit/Tests/Access/EditEntityFieldAccessCheckTest.php
@@ -41,11 +41,11 @@ class EditEntityFieldAccessCheckTest extends UnitTestCase {
protected $entityManager;
/**
- * The mocked entity storage controller.
+ * The mocked entity storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface|\PHPUnit_Framework_MockObject_MockObject
+ * @var \Drupal\Core\Entity\EntityStorageInterface|\PHPUnit_Framework_MockObject_MockObject
*/
- protected $entityStorageController;
+ protected $entityStorage;
public static function getInfo() {
return array(
@@ -58,11 +58,11 @@ class EditEntityFieldAccessCheckTest extends UnitTestCase {
protected function setUp() {
$this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
- $this->entityStorageController = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
+ $this->entityStorage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
$this->entityManager->expects($this->any())
- ->method('getStorageController')
- ->will($this->returnValue($this->entityStorageController));
+ ->method('getStorage')
+ ->will($this->returnValue($this->entityStorage));
$this->editAccessCheck = new EditEntityFieldAccessCheck($this->entityManager);
}
@@ -173,7 +173,7 @@ class EditEntityFieldAccessCheckTest extends UnitTestCase {
->with('entity_test')
->will($this->returnValue(array('id' => 'entity_test')));
- $this->entityStorageController->expects($this->once())
+ $this->entityStorage->expects($this->once())
->method('load')
->with(1)
->will($this->returnValue(NULL));
diff --git a/core/modules/editor/lib/Drupal/editor/EditorController.php b/core/modules/editor/lib/Drupal/editor/EditorController.php
index 0e65571..59c1ef9 100644
--- a/core/modules/editor/lib/Drupal/editor/EditorController.php
+++ b/core/modules/editor/lib/Drupal/editor/EditorController.php
@@ -77,7 +77,7 @@ class EditorController extends ControllerBase {
$original_format = NULL;
if (isset($original_format_id)) {
$original_format = $this->entityManager()
- ->getStorageController('filter_format')
+ ->getStorage('filter_format')
->load($original_format_id);
}
diff --git a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
index 07dcc4b..82b4ff7 100644
--- a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
+++ b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
@@ -105,7 +105,7 @@ class Editor extends ConfigEntityBase implements EditorInterface {
*/
public function getFilterFormat() {
if (!$this->filterFormat) {
- $this->filterFormat = \Drupal::entityManager()->getStorageController('filter_format')->load($this->format);
+ $this->filterFormat = \Drupal::entityManager()->getStorage('filter_format')->load($this->format);
}
return $this->filterFormat;
}
diff --git a/core/modules/editor/tests/Drupal/editor/Tests/EditorConfigEntityUnitTest.php b/core/modules/editor/tests/Drupal/editor/Tests/EditorConfigEntityUnitTest.php
index 2760e93..9064172 100644
--- a/core/modules/editor/tests/Drupal/editor/Tests/EditorConfigEntityUnitTest.php
+++ b/core/modules/editor/tests/Drupal/editor/Tests/EditorConfigEntityUnitTest.php
@@ -152,14 +152,14 @@ class EditorConfigEntityUnitTest extends UnitTestCase {
->method('getConfigDependencyName')
->will($this->returnValue('filter.format.test'));
- $storage = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
+ $storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
$storage->expects($this->once())
->method('load')
->with($format_id)
->will($this->returnValue($filter_format));
$this->entityManager->expects($this->once())
- ->method('getStorageController')
+ ->method('getStorage')
->with('filter_format')
->will($this->returnValue($storage));
diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module
index cc22891..d01563b 100644
--- a/core/modules/entity/entity.module
+++ b/core/modules/entity/entity.module
@@ -8,7 +8,7 @@
* entity system.
*/
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
/**
* Implements hook_help().
@@ -83,7 +83,7 @@ function entity_entity_bundle_rename($entity_type_id, $bundle_old, $bundle_new)
if ($bundle_old !== $bundle_new) {
$ids = \Drupal::configFactory()->listAll('entity.view_display.' . $entity_type_id . '.' . $bundle_old . '.');
foreach ($ids as $id) {
- $id = ConfigStorageController::getIDFromConfigName($id, $entity_type->getConfigPrefix());
+ $id = ConfigEntityStorage::getIDFromConfigName($id, $entity_type->getConfigPrefix());
$display = entity_load('entity_view_display', $id);
$new_id = $entity_type_id . '.' . $bundle_new . '.' . $display->mode;
$display->id = $new_id;
@@ -97,7 +97,7 @@ function entity_entity_bundle_rename($entity_type_id, $bundle_old, $bundle_new)
if ($bundle_old !== $bundle_new) {
$ids = \Drupal::configFactory()->listAll('entity.form_display.' . $entity_type_id . '.' . $bundle_old . '.');
foreach ($ids as $id) {
- $id = ConfigStorageController::getIDFromConfigName($id, $entity_type->getConfigPrefix());
+ $id = ConfigEntityStorage::getIDFromConfigName($id, $entity_type->getConfigPrefix());
$form_display = entity_load('entity_form_display', $id);
$new_id = $entity_type_id . '.' . $bundle_new . '.' . $form_display->mode;
$form_display->id = $new_id;
@@ -115,7 +115,7 @@ function entity_entity_bundle_delete($entity_type_id, $bundle) {
$entity_type = \Drupal::entityManager()->getDefinition('entity_view_display');
$ids = \Drupal::configFactory()->listAll('entity.view_display.' . $entity_type_id . '.' . $bundle . '.');
foreach ($ids as &$id) {
- $id = ConfigStorageController::getIDFromConfigName($id, $entity_type->getConfigPrefix());
+ $id = ConfigEntityStorage::getIDFromConfigName($id, $entity_type->getConfigPrefix());
}
entity_delete_multiple('entity_view_display', $ids);
@@ -123,7 +123,7 @@ function entity_entity_bundle_delete($entity_type_id, $bundle) {
$entity_type = \Drupal::entityManager()->getDefinition('entity_form_display');
$ids = \Drupal::configFactory()->listAll('entity.form_display.' . $entity_type_id . '.' . $bundle . '.');
foreach ($ids as &$id) {
- $id = ConfigStorageController::getIDFromConfigName($id, $entity_type->getConfigPrefix());
+ $id = ConfigEntityStorage::getIDFromConfigName($id, $entity_type->getConfigPrefix());
}
entity_delete_multiple('entity_form_display', $ids);
}
diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php
index 29fd6e0..34ee7fe 100644
--- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php
+++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php
@@ -78,7 +78,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn
->execute();
// Load the first valid candidate display, if any.
- $storage = \Drupal::entityManager()->getStorageController('entity_form_display');
+ $storage = \Drupal::entityManager()->getStorage('entity_form_display');
foreach ($candidate_ids as $candidate_id) {
if (isset($results[$candidate_id])) {
$display = $storage->load($candidate_id);
diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php
index e4d3880..6af84c9 100644
--- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php
+++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php
@@ -20,7 +20,7 @@ use Drupal\entity\EntityDisplayBase;
* id = "entity_view_display",
* label = @Translation("Entity view display"),
* controllers = {
- * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController"
+ * "storage" = "Drupal\Core\Config\Entity\ConfigEntityStorage"
* },
* config_prefix = "view_display",
* entity_keys = {
@@ -106,7 +106,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
}
// Load the selected displays.
- $storage = \Drupal::entityManager()->getStorageController('entity_view_display');
+ $storage = \Drupal::entityManager()->getStorage('entity_view_display');
$displays = $storage->loadMultiple($load_ids);
$displays_by_bundle = array();
diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
index 1a2bc5e..79a8b01 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php
@@ -8,7 +8,7 @@
namespace Drupal\entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Entity\Display\EntityDisplayInterface;
use Drupal\field\Field;
@@ -141,10 +141,10 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
+ public function preSave(EntityStorageInterface $storage, $update = TRUE) {
// Sort elements by weight before saving.
uasort($this->content, 'Drupal\Component\Utility\SortArray::sortByWeightElement');
- parent::preSave($storage_controller, $update);
+ parent::preSave($storage, $update);
}
/**
@@ -158,7 +158,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
if ($bundle_entity_type_id != 'bundle') {
// If the target entity type uses entities to manage its bundles then
// depend on the bundle entity.
- $bundle_entity = \Drupal::entityManager()->getStorageController($bundle_entity_type_id)->load($this->bundle);
+ $bundle_entity = \Drupal::entityManager()->getStorage($bundle_entity_type_id)->load($this->bundle);
$this->addDependency('entity', $bundle_entity->getConfigDependencyName());
}
// Create dependencies on both hidden and visible fields.
@@ -177,7 +177,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
}
// Depend on configured modes.
if ($this->mode != 'default') {
- $mode_entity = \Drupal::entityManager()->getStorageController($this->displayContext . '_mode')->load($target_entity_type->id() . '.' . $this->mode);
+ $mode_entity = \Drupal::entityManager()->getStorage($this->displayContext . '_mode')->load($target_entity_type->id() . '.' . $this->mode);
$this->addDependency('entity', $mode_entity->getConfigDependencyName());
}
return $this->dependencies;
@@ -186,7 +186,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
// Reset the render cache for the target entity type.
if (\Drupal::entityManager()->hasController($this->targetEntityType, 'view_builder')) {
\Drupal::entityManager()->getViewBuilder($this->targetEntityType)->resetCache();
diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php
index a5c9909..57b37cb 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php
@@ -9,7 +9,7 @@ namespace Drupal\entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Base class for config entity types that hold settings for form and view modes.
@@ -92,16 +92,16 @@ abstract class EntityDisplayModeBase extends ConfigEntityBase implements EntityD
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
\Drupal::entityManager()->clearCachedDefinitions();
}
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::preDelete($storage_controller, $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
+ parent::preDelete($storage, $entities);
\Drupal::entityManager()->clearCachedDefinitions();
}
diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php
index 67f4a2d..05c241a 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php
@@ -9,7 +9,7 @@ namespace Drupal\entity;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -32,12 +32,12 @@ class EntityDisplayModeListBuilder extends ConfigEntityListBuilder {
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Core\Entity\EntityTypeInterface[] $entity_types
* List of all entity types.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, array $entity_types) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, array $entity_types) {
parent::__construct($entity_type, $storage);
$this->entityTypes = $entity_types;
@@ -50,7 +50,7 @@ class EntityDisplayModeListBuilder extends ConfigEntityListBuilder {
$entity_manager = $container->get('entity.manager');
return new static(
$entity_type,
- $entity_manager->getStorageController($entity_type->id()),
+ $entity_manager->getStorage($entity_type->id()),
$entity_manager->getDefinitions()
);
}
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
index ecf448e..63f8a00 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
@@ -79,7 +79,7 @@ class EntityReferenceAutocomplete {
$entity = NULL;
if ($entity_id !== 'NULL') {
- $entity = $this->entityManager->getStorageController($entity_type)->load($entity_id);
+ $entity = $this->entityManager->getStorage($entity_type)->load($entity_id);
if (!$entity || !$entity->access('view')) {
throw new AccessDeniedHttpException();
}
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldType/ConfigurableEntityReferenceFieldItemList.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldType/ConfigurableEntityReferenceFieldItemList.php
index 3b95917..93a724a 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldType/ConfigurableEntityReferenceFieldItemList.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldType/ConfigurableEntityReferenceFieldItemList.php
@@ -38,7 +38,7 @@ class ConfigurableEntityReferenceFieldItemList extends FieldItemList {
->condition('uuid', $uuids, 'IN')
->execute();
$entities = \Drupal::entityManager()
- ->getStorageController($target_type)
+ ->getStorage($target_type)
->loadMultiple($entity_ids);
foreach ($entities as $id => $entity) {
@@ -80,7 +80,7 @@ class ConfigurableEntityReferenceFieldItemList extends FieldItemList {
$ids[] = $properties['target_id'];
}
$entities = \Drupal::entityManager()
- ->getStorageController($this->getSetting('target_type'))
+ ->getStorage($this->getSetting('target_type'))
->loadMultiple($ids);
foreach ($default_value as $delta => $properties) {
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php
index 66849a7..2ed1dfe 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php
@@ -184,7 +184,7 @@ abstract class AutocompleteWidgetBase extends WidgetBase {
$bundle_key = $entity_type->getKey('bundle');
$label_key = $entity_type->getKey('label');
- $entity = $entity_manager->getStorageController($target_type)->create(array(
+ $entity = $entity_manager->getStorage($target_type)->create(array(
$label_key => $label,
$bundle_key => $bundle,
));
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 2342667..52f3996 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -44,7 +44,7 @@ require_once __DIR__ . '/field.deprecated.inc';
* type 'image'. The administrator (again, via a UI) creates two Field
* Instances, one attaching the field 'subtitle' to the 'node' bundle 'article'
* and one attaching the field 'photo' to the 'node' bundle 'article'. When the
- * node storage controller loads an Article node, it loads the values of the
+ * node storage loads an Article node, it loads the values of the
* 'subtitle' and 'photo' fields because they are both attached to the 'node'
* bundle 'article'.
*
diff --git a/core/modules/field/field.purge.inc b/core/modules/field/field.purge.inc
index 78b589d..212c2b5 100644
--- a/core/modules/field/field.purge.inc
+++ b/core/modules/field/field.purge.inc
@@ -17,7 +17,7 @@ use Drupal\field\FieldException;
* entities as well as deleting entire fields or field instances in a single
* operation.
*
- * When a single entity is deleted, the Entity storage controller performs the
+ * When a single entity is deleted, the Entity storage performs the
* following operations:
* - Invoking the FieldItemListInterface delete() method for each field on the
* entity. A file field type might use this method to delete uploaded files
@@ -103,7 +103,7 @@ function field_purge_batch($batch_size) {
$ids->revision_id = $revision_id;
$ids->entity_id = $entity_id;
$entity = _field_create_entity_from_ids($ids);
- \Drupal::entityManager()->getStorageController($entity_type)->onFieldItemsPurge($entity, $instance);
+ \Drupal::entityManager()->getStorage($entity_type)->onFieldItemsPurge($entity, $instance);
}
}
else {
@@ -174,7 +174,7 @@ function field_purge_field($field) {
$state->set('field.field.deleted', $deleted_fields);
// Notify the storage layer.
- \Drupal::entityManager()->getStorageController($field->entity_type)->onFieldPurge($field);
+ \Drupal::entityManager()->getStorage($field->entity_type)->onFieldPurge($field);
// Clear the cache.
field_info_cache_clear();
diff --git a/core/modules/field/field.views.inc b/core/modules/field/field.views.inc
index 885134b..c142163 100644
--- a/core/modules/field/field.views.inc
+++ b/core/modules/field/field.views.inc
@@ -6,8 +6,8 @@
*/
use Drupal\Component\Utility\NestedArray;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\field\FieldConfigInterface;
/**
@@ -63,11 +63,11 @@ function field_views_data_alter(&$data) {
* The field definition.
*
* @return bool
- * True if the entity type uses DatabaseStorageController.
+ * True if the entity type uses ContentEntityDatabaseStorage.
*/
function _field_views_is_sql_entity_type(FieldConfigInterface $field) {
$entity_manager = \Drupal::entityManager();
- if ($entity_manager->getDefinition($field->entity_type) && $entity_manager->getStorageController($field->entity_type) instanceof FieldableDatabaseStorageController) {
+ if ($entity_manager->getDefinition($field->entity_type) && $entity_manager->getStorage($field->entity_type) instanceof ContentEntityDatabaseStorage) {
return TRUE;
}
}
@@ -139,20 +139,20 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
// Description of the field tables.
$field_tables = array(
- EntityStorageControllerInterface::FIELD_LOAD_CURRENT => array(
- 'table' => FieldableDatabaseStorageController::_fieldTableName($field),
+ EntityStorageInterface::FIELD_LOAD_CURRENT => array(
+ 'table' => ContentEntityDatabaseStorage::_fieldTableName($field),
'alias' => "{$entity_type_id}__{$field_name}",
),
);
if ($supports_revisions) {
- $field_tables[EntityStorageControllerInterface::FIELD_LOAD_REVISION] = array(
- 'table' => FieldableDatabaseStorageController::_fieldRevisionTableName($field),
+ $field_tables[EntityStorageInterface::FIELD_LOAD_REVISION] = array(
+ 'table' => ContentEntityDatabaseStorage::_fieldRevisionTableName($field),
'alias' => "{$entity_type_id}_revision__{$field_name}",
);
}
// Build the relationships between the field table and the entity tables.
- $table_alias = $field_tables[EntityStorageControllerInterface::FIELD_LOAD_CURRENT]['alias'];
+ $table_alias = $field_tables[EntityStorageInterface::FIELD_LOAD_CURRENT]['alias'];
$data[$table_alias]['table']['join'][$entity_table] = array(
'left_field' => $entity_type->getKey('id'),
'field' => 'entity_id',
@@ -161,7 +161,7 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
),
);
if ($supports_revisions) {
- $table_alias = $field_tables[EntityStorageControllerInterface::FIELD_LOAD_REVISION]['alias'];
+ $table_alias = $field_tables[EntityStorageInterface::FIELD_LOAD_REVISION]['alias'];
$data[$table_alias]['table']['join'][$entity_revision_table] = array(
'left_field' => $entity_type->getKey('revision'),
'field' => 'revision_id',
@@ -177,7 +177,7 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
// Build the list of additional fields to add to queries.
$add_fields = array('delta', 'langcode', 'bundle');
foreach (array_keys($field_columns) as $column) {
- $add_fields[] = FieldableDatabaseStorageController::_fieldColumnName($field, $column);
+ $add_fields[] = ContentEntityDatabaseStorage::_fieldColumnName($field, $column);
}
// Determine the label to use for the field. We don't have a label available
// at the field level, so we just go through all instances and take the one
@@ -189,7 +189,7 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
$table = $table_info['table'];
$table_alias = $table_info['alias'];
- if ($type == EntityStorageControllerInterface::FIELD_LOAD_CURRENT) {
+ if ($type == EntityStorageInterface::FIELD_LOAD_CURRENT) {
$group = $group_name;
$field_alias = $field_name;
}
@@ -210,7 +210,7 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
$aliases = array();
$also_known = array();
foreach ($all_labels as $label_name => $true) {
- if ($type == EntityStorageControllerInterface::FIELD_LOAD_CURRENT) {
+ if ($type == EntityStorageInterface::FIELD_LOAD_CURRENT) {
if ($label != $label_name) {
$aliases[] = array(
'base' => $entity_table,
@@ -249,7 +249,7 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
'entity_tables' => $entity_tables,
// Default the element type to div, let the UI change it if necessary.
'element type' => 'div',
- 'is revision' => $type == EntityStorageControllerInterface::FIELD_LOAD_REVISION,
+ 'is revision' => $type == EntityStorageInterface::FIELD_LOAD_REVISION,
);
}
@@ -295,16 +295,16 @@ function field_views_field_default_views_data(FieldConfigInterface $field) {
$table = $table_info['table'];
$table_alias = $table_info['alias'];
- if ($type == EntityStorageControllerInterface::FIELD_LOAD_CURRENT) {
+ if ($type == EntityStorageInterface::FIELD_LOAD_CURRENT) {
$group = $group_name;
}
else {
$group = t('@group (historical data)', array('@group' => $group_name));
}
- $column_real_name = FieldableDatabaseStorageController::_fieldColumnName($field, $column);
+ $column_real_name = ContentEntityDatabaseStorage::_fieldColumnName($field, $column);
// Load all the fields from the table by default.
- $field_sql_schema = FieldableDatabaseStorageController::_fieldSqlSchema($field);
+ $field_sql_schema = ContentEntityDatabaseStorage::_fieldSqlSchema($field);
$additional_fields = array_keys($field_sql_schema[$table]['fields']);
$data[$table_alias][$column_real_name] = array(
diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
index 844853e..ff54ff4 100644
--- a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
+++ b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
@@ -10,7 +10,7 @@ namespace Drupal\field\Entity;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Field\TypedData\FieldItemDataDefinition;
use Drupal\field\FieldException;
@@ -23,7 +23,7 @@ use Drupal\field\FieldConfigInterface;
* id = "field_config",
* label = @Translation("Field"),
* controllers = {
- * "storage" = "Drupal\field\FieldConfigStorageController"
+ * "storage" = "Drupal\field\FieldConfigStorage"
* },
* config_prefix = "field",
* entity_keys = {
@@ -269,15 +269,15 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
* @throws \Drupal\Core\Entity\EntityStorageException
* In case of failures at the configuration storage level.
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
+ public function preSave(EntityStorageInterface $storage) {
// Clear the derived data about the field.
unset($this->schema);
if ($this->isNew()) {
- $this->preSaveNew($storage_controller);
+ $this->preSaveNew($storage);
}
else {
- $this->preSaveUpdated($storage_controller);
+ $this->preSaveUpdated($storage);
}
if (!$this->isSyncing()) {
// Ensure the correct dependencies are present.
@@ -288,12 +288,12 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
/**
* Prepares saving a new field definition.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The entity storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage.
*
* @throws \Drupal\field\FieldException If the field definition is invalid.
*/
- protected function preSaveNew(EntityStorageControllerInterface $storage_controller) {
+ protected function preSaveNew(EntityStorageInterface $storage) {
$entity_manager = \Drupal::entityManager();
$field_type_manager = \Drupal::service('plugin.manager.field.field_type');
@@ -329,8 +329,8 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
// definition is passed to the various hooks and written to config.
$this->settings += $field_type_manager->getDefaultSettings($this->type);
- // Notify the entity storage controller.
- $entity_manager->getStorageController($this->entity_type)->onFieldCreate($this);
+ // Notify the entity storage.
+ $entity_manager->getStorage($this->entity_type)->onFieldCreate($this);
}
/**
@@ -346,10 +346,10 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
/**
* Prepares saving an updated field definition.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The entity storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage.
*/
- protected function preSaveUpdated(EntityStorageControllerInterface $storage_controller) {
+ protected function preSaveUpdated(EntityStorageInterface $storage) {
$module_handler = \Drupal::moduleHandler();
$entity_manager = \Drupal::entityManager();
$field_type_manager = \Drupal::service('plugin.manager.field.field_type');
@@ -370,16 +370,16 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
// invokes hook_field_config_update_forbid().
$module_handler->invokeAll('field_config_update_forbid', array($this, $this->original));
- // Notify the storage controller. The controller can reject the definition
+ // Notify the storage. The controller can reject the definition
// update as invalid by raising an exception, which stops execution before
// the definition is written to config.
- $entity_manager->getStorageController($this->entity_type)->onFieldUpdate($this);
+ $entity_manager->getStorage($this->entity_type)->onFieldUpdate($this);
}
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
// Clear the cache.
field_cache_clear();
@@ -396,9 +396,9 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $fields) {
+ public static function preDelete(EntityStorageInterface $storage, array $fields) {
$state = \Drupal::state();
- $instance_controller = \Drupal::entityManager()->getStorageController('field_instance_config');
+ $instance_storage = \Drupal::entityManager()->getStorage('field_instance_config');
// Delete instances first. Note: when deleting a field through
// FieldInstanceConfig::postDelete(), the instances have been deleted already, so
@@ -412,12 +412,12 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
}
}
if ($instance_ids) {
- $instances = $instance_controller->loadMultiple($instance_ids);
+ $instances = $instance_storage->loadMultiple($instance_ids);
// Tag the objects to preserve recursive deletion of the field.
foreach ($instances as $instance) {
$instance->noFieldDelete = TRUE;
}
- $instance_controller->delete($instances);
+ $instance_storage->delete($instances);
}
// Keep the field definitions in the state storage so we can use them later
@@ -438,11 +438,11 @@ class FieldConfig extends ConfigEntityBase implements FieldConfigInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $fields) {
+ public static function postDelete(EntityStorageInterface $storage, array $fields) {
// Notify the storage.
foreach ($fields as $field) {
if (!$field->deleted) {
- \Drupal::entityManager()->getStorageController($field->entity_type)->onFieldDelete($field);
+ \Drupal::entityManager()->getStorage($field->entity_type)->onFieldDelete($field);
}
}
diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
index 3b2b503..aa77ef8 100644
--- a/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
+++ b/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
@@ -9,7 +9,7 @@ namespace Drupal\field\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Field\TypedData\FieldItemDataDefinition;
use Drupal\field\Field;
@@ -23,7 +23,7 @@ use Drupal\field\FieldInstanceConfigInterface;
* id = "field_instance_config",
* label = @Translation("Field instance"),
* controllers = {
- * "storage" = "Drupal\field\FieldInstanceConfigStorageController"
+ * "storage" = "Drupal\field\FieldInstanceConfigStorage"
* },
* config_prefix = "instance",
* entity_keys = {
@@ -329,15 +329,15 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
* @throws \Drupal\Core\Entity\EntityStorageException
* In case of failures at the configuration storage level.
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
+ public function preSave(EntityStorageInterface $storage) {
$entity_manager = \Drupal::entityManager();
$field_type_manager = \Drupal::service('plugin.manager.field.field_type');
if ($this->isNew()) {
// Set the default instance settings.
$this->settings += $field_type_manager->getDefaultInstanceSettings($this->field->type);
- // Notify the entity storage controller.
- $entity_manager->getStorageController($this->entity_type)->onInstanceCreate($this);
+ // Notify the entity storage.
+ $entity_manager->getStorage($this->entity_type)->onInstanceCreate($this);
}
else {
// Some updates are always disallowed.
@@ -352,8 +352,8 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
}
// Set the default instance settings.
$this->settings += $field_type_manager->getDefaultInstanceSettings($this->field->type);
- // Notify the entity storage controller.
- $entity_manager->getStorageController($this->entity_type)->onInstanceUpdate($this);
+ // Notify the entity storage.
+ $entity_manager->getStorage($this->entity_type)->onInstanceUpdate($this);
}
if (!$this->isSyncing()) {
// Ensure the correct dependencies are present.
@@ -372,7 +372,7 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
if ($bundle_entity_type_id != 'bundle') {
// If the target entity type uses entities to manage its bundles then
// depend on the bundle entity.
- $bundle_entity = \Drupal::entityManager()->getStorageController($bundle_entity_type_id)->load($this->bundle);
+ $bundle_entity = \Drupal::entityManager()->getStorage($bundle_entity_type_id)->load($this->bundle);
$this->addDependency('entity', $bundle_entity->getConfigDependencyName());
}
return $this->dependencies;
@@ -381,7 +381,7 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
// Clear the cache.
field_cache_clear();
@@ -396,7 +396,7 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $instances) {
+ public static function preDelete(EntityStorageInterface $storage, array $instances) {
$state = \Drupal::state();
// Keep the instance definitions in the state storage so we can use them
@@ -415,16 +415,16 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $instances) {
- $field_controller = \Drupal::entityManager()->getStorageController('field_config');
+ public static function postDelete(EntityStorageInterface $storage, array $instances) {
+ $field_storage = \Drupal::entityManager()->getStorage('field_config');
// Clear the cache upfront, to refresh the results of getBundles().
field_cache_clear();
- // Notify the entity storage controller.
+ // Notify the entity storage.
foreach ($instances as $instance) {
if (!$instance->deleted) {
- \Drupal::entityManager()->getStorageController($instance->entity_type)->onInstanceDelete($instance);
+ \Drupal::entityManager()->getStorage($instance->entity_type)->onInstanceDelete($instance);
}
}
@@ -445,7 +445,7 @@ class FieldInstanceConfig extends ConfigEntityBase implements FieldInstanceConfi
}
}
if ($fields_to_delete) {
- $field_controller->delete($fields_to_delete);
+ $field_storage->delete($fields_to_delete);
}
// Cleanup entity displays.
diff --git a/core/modules/field/lib/Drupal/field/FieldConfigStorageController.php b/core/modules/field/lib/Drupal/field/FieldConfigStorage.php
index 7fb0866..ba1803a 100644
--- a/core/modules/field/lib/Drupal/field/FieldConfigStorageController.php
+++ b/core/modules/field/lib/Drupal/field/FieldConfigStorage.php
@@ -2,14 +2,14 @@
/**
* @file
- * Contains \Drupal\field\FieldConfigStorageController.
+ * Contains \Drupal\field\FieldConfigStorage.
*/
namespace Drupal\field;
use Drupal\Component\Uuid\UuidInterface;
use Drupal\Core\Config\Config;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\Query\QueryFactory;
@@ -22,7 +22,7 @@ use Drupal\Core\KeyValueStore\StateInterface;
/**
* Controller class for fields.
*/
-class FieldConfigStorageController extends ConfigStorageController {
+class FieldConfigStorage extends ConfigEntityStorage {
/**
* The module handler.
@@ -46,7 +46,7 @@ class FieldConfigStorageController extends ConfigStorageController {
protected $state;
/**
- * Constructs a FieldConfigStorageController object.
+ * Constructs a FieldConfigStorage object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
@@ -97,18 +97,18 @@ class FieldConfigStorageController extends ConfigStorageController {
if (isset($conditions['entity_type']) && isset($conditions['field_name'])) {
// Optimize for the most frequent case where we do have a specific ID.
$id = $conditions['entity_type'] . $conditions['field_name'];
- $fields = $this->entityManager->getStorageController($this->entityTypeId)->loadMultiple(array($id));
+ $fields = $this->entityManager->getStorage($this->entityTypeId)->loadMultiple(array($id));
}
else {
// No specific ID, we need to examine all existing fields.
- $fields = $this->entityManager->getStorageController($this->entityTypeId)->loadMultiple();
+ $fields = $this->entityManager->getStorage($this->entityTypeId)->loadMultiple();
}
// Merge deleted fields (stored in state) if needed.
if ($include_deleted) {
$deleted_fields = $this->state->get('field.field.deleted') ?: array();
foreach ($deleted_fields as $id => $config) {
- $fields[$id] = $this->entityManager->getStorageController($this->entityTypeId)->create($config);
+ $fields[$id] = $this->entityManager->getStorage($this->entityTypeId)->create($config);
}
}
diff --git a/core/modules/field/lib/Drupal/field/FieldInstanceConfigStorageController.php b/core/modules/field/lib/Drupal/field/FieldInstanceConfigStorage.php
index d18fbf3..1942ef5 100644
--- a/core/modules/field/lib/Drupal/field/FieldInstanceConfigStorageController.php
+++ b/core/modules/field/lib/Drupal/field/FieldInstanceConfigStorage.php
@@ -2,13 +2,13 @@
/**
* @file
- * Contains \Drupal\field\FieldInstanceConfigStorageController.
+ * Contains \Drupal\field\FieldInstanceConfigStorage.
*/
namespace Drupal\field;
use Drupal\Core\Config\Config;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\Query\QueryFactory;
@@ -27,7 +27,7 @@ use Drupal\Core\KeyValueStore\StateInterface;
* (field.field.* entries are processed before field.instance.* entries).
* @todo Revisit after http://drupal.org/node/1944368.
*/
-class FieldInstanceConfigStorageController extends ConfigStorageController {
+class FieldInstanceConfigStorage extends ConfigEntityStorage {
/**
* The entity manager.
@@ -44,7 +44,7 @@ class FieldInstanceConfigStorageController extends ConfigStorageController {
protected $state;
/**
- * Constructs a FieldInstanceConfigStorageController object.
+ * Constructs a FieldInstanceConfigStorage object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
@@ -104,18 +104,18 @@ class FieldInstanceConfigStorageController extends ConfigStorageController {
if (isset($conditions['entity_type']) && isset($conditions['bundle']) && isset($conditions['field_name'])) {
// Optimize for the most frequent case where we do have a specific ID.
$id = $conditions['entity_type'] . '.' . $conditions['bundle'] . '.' . $conditions['field_name'];
- $instances = $this->entityManager->getStorageController($this->entityTypeId)->loadMultiple(array($id));
+ $instances = $this->entityManager->getStorage($this->entityTypeId)->loadMultiple(array($id));
}
else {
// No specific ID, we need to examine all existing instances.
- $instances = $this->entityManager->getStorageController($this->entityTypeId)->loadMultiple();
+ $instances = $this->entityManager->getStorage($this->entityTypeId)->loadMultiple();
}
// Merge deleted instances (stored in state) if needed.
if ($include_deleted) {
$deleted_instances = $this->state->get('field.instance.deleted') ?: array();
foreach ($deleted_instances as $id => $config) {
- $instances[$id] = $this->entityManager->getStorageController($this->entityTypeId)->create($config);
+ $instances[$id] = $this->entityManager->getStorage($this->entityTypeId)->create($config);
}
}
diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
index 3349609..6620e3f 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
@@ -9,9 +9,9 @@ namespace Drupal\field\Plugin\views\field;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\field\Field as FieldHelper;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FormatterPluginManager;
use Drupal\Core\Language\Language;
@@ -228,7 +228,7 @@ class Field extends FieldPluginBase {
$options += is_array($this->options['group_columns']) ? $this->options['group_columns'] : array();
$fields = array();
- $rkey = $this->definition['is revision'] ? EntityStorageControllerInterface::FIELD_LOAD_REVISION : EntityStorageControllerInterface::FIELD_LOAD_CURRENT;
+ $rkey = $this->definition['is revision'] ? EntityStorageInterface::FIELD_LOAD_REVISION : EntityStorageInterface::FIELD_LOAD_CURRENT;
// Go through the list and determine the actual column name from field api.
foreach ($options as $column) {
$name = $column;
@@ -309,7 +309,7 @@ class Field extends FieldPluginBase {
$this->ensureMyTable();
$field = field_info_field($this->definition['entity_type'], $this->definition['field_name']);
- $column = FieldableDatabaseStorageController::_fieldColumnName($field, $this->options['click_sort_column']);
+ $column = ContentEntityDatabaseStorage::_fieldColumnName($field, $this->options['click_sort_column']);
if (!isset($this->aliases[$column])) {
// Column is not in query; add a sort on it (without adding the column).
$this->aliases[$column] = $this->tableAlias . '.' . $column;
diff --git a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php
index caac10c..2b74370 100644
--- a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php
@@ -7,7 +7,7 @@
namespace Drupal\field\Tests;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\Core\Entity\EntityInterface;
use Drupal\field\FieldConfigInterface;
@@ -186,9 +186,9 @@ class BulkDeleteTest extends FieldUnitTestBase {
$this->assertEqual($instance->bundle, $bundle, 'The deleted instance is for the correct bundle');
// Check that the actual stored content did not change during delete.
- $schema = FieldableDatabaseStorageController::_fieldSqlSchema($field);
- $table = FieldableDatabaseStorageController::_fieldTableName($field);
- $column = FieldableDatabaseStorageController::_fieldColumnName($field, 'value');
+ $schema = ContentEntityDatabaseStorage::_fieldSqlSchema($field);
+ $table = ContentEntityDatabaseStorage::_fieldTableName($field);
+ $column = ContentEntityDatabaseStorage::_fieldColumnName($field, 'value');
$result = db_select($table, 't')
->fields('t', array_keys($schema[$table]['fields']))
->execute();
diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php
index d6608a0..a16a695 100644
--- a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php
@@ -217,7 +217,7 @@ class FieldAttachOtherTest extends FieldUnitTestBase {
$this->assertFalse(\Drupal::cache('entity')->get($cid), 'Cached: no cache entry on insert');
// Load, and check that a cache entry is present with the expected values.
- $controller = $this->container->get('entity.manager')->getStorageController($entity->getEntityTypeId());
+ $controller = $this->container->get('entity.manager')->getStorage($entity->getEntityTypeId());
$controller->resetCache();
$controller->load($entity->id());
$cache = \Drupal::cache('entity')->get($cid);
diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldAttachStorageTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldAttachStorageTest.php
index a981a18..4b0e85e 100644
--- a/core/modules/field/lib/Drupal/field/Tests/FieldAttachStorageTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/FieldAttachStorageTest.php
@@ -70,9 +70,9 @@ class FieldAttachStorageTest extends FieldUnitTestBase {
$values[$current_revision] = $current_values;
}
- $storage_controller = $this->container->get('entity.manager')->getStorageController($entity_type);
- $storage_controller->resetCache();
- $entity = $storage_controller->load($entity_id);
+ $storage = $this->container->get('entity.manager')->getStorage($entity_type);
+ $storage->resetCache();
+ $entity = $storage->load($entity_id);
// Confirm current revision loads the correct data.
// Number of values per field loaded equals the field cardinality.
$this->assertEqual(count($entity->{$this->field_name}), $cardinality, 'Current revision: expected number of values');
@@ -87,7 +87,7 @@ class FieldAttachStorageTest extends FieldUnitTestBase {
// Confirm each revision loads the correct data.
foreach (array_keys($values) as $revision_id) {
- $entity = $storage_controller->loadRevision($revision_id);
+ $entity = $storage->loadRevision($revision_id);
// Number of values per field loaded equals the field cardinality.
$this->assertEqual(count($entity->{$this->field_name}), $cardinality, format_string('Revision %revision_id: expected number of values.', array('%revision_id' => $revision_id)));
for ($delta = 0; $delta < $cardinality; $delta++) {
@@ -156,7 +156,7 @@ class FieldAttachStorageTest extends FieldUnitTestBase {
}
// Check that a single load correctly loads field values for both entities.
- $controller = \Drupal::entityManager()->getStorageController($entity->getEntityTypeId());
+ $controller = \Drupal::entityManager()->getStorage($entity->getEntityTypeId());
$controller->resetCache();
$entities = $controller->loadMultiple();
foreach ($entities as $index => $entity) {
@@ -267,7 +267,7 @@ class FieldAttachStorageTest extends FieldUnitTestBase {
$entity->setNewRevision();
$entity->save();
$vids[] = $entity->getRevisionId();
- $controller = $this->container->get('entity.manager')->getStorageController($entity->getEntityTypeId());
+ $controller = $this->container->get('entity.manager')->getStorage($entity->getEntityTypeId());
$controller->resetCache();
// Confirm each revision loads
@@ -334,7 +334,7 @@ class FieldAttachStorageTest extends FieldUnitTestBase {
$this->assertIdentical($this->instance->bundle, $new_bundle, "Bundle name has been updated in the instance.");
// Verify the field data is present on load.
- $controller = $this->container->get('entity.manager')->getStorageController($entity->getEntityTypeId());
+ $controller = $this->container->get('entity.manager')->getStorage($entity->getEntityTypeId());
$controller->resetCache();
$entity = $controller->load($entity->id());
$this->assertEqual(count($entity->{$this->field_name}), $cardinality, "Bundle name has been updated in the field storage");
@@ -389,7 +389,7 @@ class FieldAttachStorageTest extends FieldUnitTestBase {
entity_test_delete_bundle($this->instance->bundle, $entity_type);
// Verify no data gets loaded
- $controller = $this->container->get('entity.manager')->getStorageController($entity->getEntityTypeId());
+ $controller = $this->container->get('entity.manager')->getStorage($entity->getEntityTypeId());
$controller->resetCache();
$entity= $controller->load($entity->id());
diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldInstanceCrudTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldInstanceCrudTest.php
index 19851fb..f8a02ab 100644
--- a/core/modules/field/lib/Drupal/field/Tests/FieldInstanceCrudTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/FieldInstanceCrudTest.php
@@ -211,8 +211,8 @@ class FieldInstanceCrudTest extends FieldUnitTestBase {
$instance->save();
$instance_2 = entity_create('field_instance_config', $instance_definition_2);
$instance_2->save();
- $instance_controller = $this->container->get('entity.manager')->getStorageController('field_instance_config');
- $instance_controller->delete(array($instance, $instance_2));
+ $instance_storage = $this->container->get('entity.manager')->getStorage('field_instance_config');
+ $instance_storage->delete(array($instance, $instance_2));
$this->assertFalse(field_info_field('entity_test', $field->name));
}
diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php b/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php
index 9e10afd..cf43966 100644
--- a/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php
+++ b/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php
@@ -109,7 +109,7 @@ abstract class FieldUnitTestBase extends DrupalUnitTestBase {
*/
protected function entitySaveReload(EntityInterface $entity) {
$entity->save();
- $controller = $this->container->get('entity.manager')->getStorageController($entity->getEntityTypeId());
+ $controller = $this->container->get('entity.manager')->getStorage($entity->getEntityTypeId());
$controller->resetCache();
return $controller->load($entity->id());
}
diff --git a/core/modules/field/lib/Drupal/field/Tests/FormTest.php b/core/modules/field/lib/Drupal/field/Tests/FormTest.php
index 3b4a96b..bbfccb7 100644
--- a/core/modules/field/lib/Drupal/field/Tests/FormTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/FormTest.php
@@ -151,7 +151,7 @@ class FormTest extends FieldTestBase {
);
$this->drupalPostForm(NULL, $edit, t('Save'));
$this->assertText(t('entity_test @id has been updated.', array('@id' => $id)), 'Entity was updated');
- $this->container->get('entity.manager')->getStorageController('entity_test')->resetCache(array($id));
+ $this->container->get('entity.manager')->getStorage('entity_test')->resetCache(array($id));
$entity = entity_load('entity_test', $id);
$this->assertEqual($entity->{$field_name}->value, $value, 'Field value was updated');
@@ -164,7 +164,7 @@ class FormTest extends FieldTestBase {
);
$this->drupalPostForm('entity_test/manage/' . $id, $edit, t('Save'));
$this->assertText(t('entity_test @id has been updated.', array('@id' => $id)), 'Entity was updated');
- $this->container->get('entity.manager')->getStorageController('entity_test')->resetCache(array($id));
+ $this->container->get('entity.manager')->getStorage('entity_test')->resetCache(array($id));
$entity = entity_load('entity_test', $id);
$this->assertTrue($entity->{$field_name}->isEmpty(), 'Field was emptied');
}
@@ -568,7 +568,7 @@ class FormTest extends FieldTestBase {
$this->drupalPostForm($entity_type . '/manage/' . $id, $edit, t('Save'));
// Check that the new revision has the expected values.
- $this->container->get('entity.manager')->getStorageController($entity_type)->resetCache(array($id));
+ $this->container->get('entity.manager')->getStorage($entity_type)->resetCache(array($id));
$entity = entity_load($entity_type, $id);
$this->assertEqual($entity->$field_name_no_access->value, 99, 'New revision has the expected value for the field with no edit access.');
$this->assertEqual($entity->$field_name->value, 2, 'New revision has the expected value for the field with edit access.');
diff --git a/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php b/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php
index be84f86..be0d496 100644
--- a/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php
@@ -6,7 +6,7 @@
*/
namespace Drupal\field\Tests\Views;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
/**
* Test the produced views_data.
@@ -62,8 +62,8 @@ class ApiDataTest extends FieldTestBase {
// Check the table and the joins of the first field.
// Attached to node only.
$field = $this->fields[0];
- $current_table = FieldableDatabaseStorageController::_fieldTableName($field);
- $revision_table = FieldableDatabaseStorageController::_fieldRevisionTableName($field);
+ $current_table = ContentEntityDatabaseStorage::_fieldTableName($field);
+ $revision_table = ContentEntityDatabaseStorage::_fieldRevisionTableName($field);
$data[$current_table] = $views_data->get($current_table);
$data[$revision_table] = $views_data->get($revision_table);
diff --git a/core/modules/field/tests/Drupal/field/Tests/FieldInstanceConfigEntityUnitTest.php b/core/modules/field/tests/Drupal/field/Tests/FieldInstanceConfigEntityUnitTest.php
index 4405c03..d8a43d4 100644
--- a/core/modules/field/tests/Drupal/field/Tests/FieldInstanceConfigEntityUnitTest.php
+++ b/core/modules/field/tests/Drupal/field/Tests/FieldInstanceConfigEntityUnitTest.php
@@ -109,17 +109,17 @@ class FieldInstanceConfigEntityUnitTest extends UnitTestCase {
->method('getConfigDependencyName')
->will($this->returnValue('test.test_entity_type.id'));
- $storage_controller = $this->getMock('\Drupal\Core\Config\Entity\ConfigStorageControllerInterface');
- $storage_controller
+ $storage = $this->getMock('\Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
+ $storage
->expects($this->any())
->method('load')
->with('test_bundle')
->will($this->returnValue($bundle_entity));
$this->entityManager->expects($this->any())
- ->method('getStorageController')
+ ->method('getStorage')
->with('bundle_entity_type')
- ->will($this->returnValue($storage_controller));
+ ->will($this->returnValue($storage));
$target_entity_type = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
$target_entity_type->expects($this->any())
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php b/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php
index 48de41e..e8d3acd 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php
@@ -51,7 +51,7 @@ class FormModeAccessCheck implements AccessInterface {
if (!$form_mode || $form_mode == 'default') {
$visibility = TRUE;
}
- elseif ($entity_display = $this->entityManager->getStorageController('entity_form_display')->load($entity_type_id . '.' . $bundle . '.' . $form_mode)) {
+ elseif ($entity_display = $this->entityManager->getStorage('entity_form_display')->load($entity_type_id . '.' . $bundle . '.' . $form_mode)) {
$visibility = $entity_display->status();
}
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php b/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php
index 8b115df..baa15f8 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php
@@ -51,7 +51,7 @@ class ViewModeAccessCheck implements AccessInterface {
if (!$view_mode || $view_mode == 'default') {
$visibility = TRUE;
}
- elseif ($entity_display = $this->entityManager->getStorageController('entity_view_display')->load($entity_type_id . '.' . $bundle . '.' . $view_mode)) {
+ elseif ($entity_display = $this->entityManager->getStorage('entity_view_display')->load($entity_type_id . '.' . $bundle . '.' . $view_mode)) {
$visibility = $entity_display->status();
}
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldConfigListBuilder.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldConfigListBuilder.php
index 94d9528..e1d96c6 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/FieldConfigListBuilder.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldConfigListBuilder.php
@@ -61,7 +61,7 @@ class FieldConfigListBuilder extends ConfigEntityListBuilder {
* The 'field type' plugin manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager) {
- parent::__construct($entity_type, $entity_manager->getStorageController($entity_type->id()));
+ parent::__construct($entity_type, $entity_manager->getStorage($entity_type->id()));
$this->entityManager = $entity_manager;
$this->bundles = entity_get_bundles();
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
index ba359cf..01c65ed 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
@@ -408,8 +408,8 @@ class FieldOverview extends OverviewBase {
// Create the field and instance.
try {
- $this->entityManager->getStorageController('field_config')->create($field)->save();
- $new_instance = $this->entityManager->getStorageController('field_instance_config')->create($instance);
+ $this->entityManager->getStorage('field_config')->create($field)->save();
+ $new_instance = $this->entityManager->getStorage('field_instance_config')->create($instance);
$new_instance->save();
// Make sure the field is displayed in the 'default' form mode (using
@@ -461,7 +461,7 @@ class FieldOverview extends OverviewBase {
);
try {
- $new_instance = $this->entityManager->getStorageController('field_instance_config')->create($instance);
+ $new_instance = $this->entityManager->getStorage('field_instance_config')->create($instance);
$new_instance->save();
// Make sure the field is displayed in the 'default' form mode (using
@@ -530,7 +530,7 @@ class FieldOverview extends OverviewBase {
// Load the instances and build the list of options.
if ($instance_ids) {
$field_types = $this->fieldTypeManager->getDefinitions();
- $instances = $this->entityManager->getStorageController('field_instance_config')->loadMultiple($instance_ids);
+ $instances = $this->entityManager->getStorage('field_instance_config')->loadMultiple($instance_ids);
foreach ($instances as $instance) {
// Do not show:
// - locked fields,
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 ce414ef..bc4c3bc 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
@@ -16,7 +16,7 @@ use Drupal\Core\Entity\Entity;
* id = "field_ui_test_no_bundle",
* label = @Translation("Test Field UI entity, no bundle"),
* controllers = {
- * "storage" = "Drupal\Core\Entity\DatabaseStorageController"
+ * "storage" = "Drupal\Core\Entity\EntityDatabaseStorage"
* },
* fieldable = TRUE
* )
diff --git a/core/modules/file/file.api.php b/core/modules/file/file.api.php
index 202081d..760f7f9 100644
--- a/core/modules/file/file.api.php
+++ b/core/modules/file/file.api.php
@@ -172,7 +172,7 @@ function hook_file_move(Drupal\file\FileInterface $file, Drupal\file\FileInterfa
* The file that is about to be deleted.
*
* @see hook_file_delete()
- * @see \Drupal\file\FileStorageController::delete()
+ * @see \Drupal\file\FileStorage::delete()
* @see upload_file_delete()
*/
function hook_file_predelete(Drupal\file\FileInterface $file) {
@@ -190,7 +190,7 @@ function hook_file_predelete(Drupal\file\FileInterface $file) {
* The file that has just been deleted.
*
* @see hook_file_predelete()
- * @see \Drupal\file\FileStorageController::delete()
+ * @see \Drupal\file\FileStorage::delete()
*/
function hook_file_delete(Drupal\file\FileInterface $file) {
// Delete all information associated with the file.
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 67e5452..3843be9 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -8,7 +8,7 @@
use Drupal\file\Entity\File;
use Drupal\Component\Utility\NestedArray;
use Drupal\Component\Utility\Unicode;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Template\Attribute;
use Drupal\file\FileUsage\FileUsageInterface;
@@ -383,7 +383,7 @@ function file_validate_size(File $file, $file_limit = 0, $user_limit = 0) {
}
// Save a query by only calling spaceUsed() when a limit is provided.
- if ($user_limit && (\Drupal::entityManager()->getStorageController('file')->spaceUsed($user->id()) + $file->getSize()) > $user_limit) {
+ if ($user_limit && (\Drupal::entityManager()->getStorage('file')->spaceUsed($user->id()) + $file->getSize()) > $user_limit) {
$errors[] = t('The file is %filesize which would exceed your disk quota of %quota.', array('%filesize' => format_size($file->getSize()), '%quota' => format_size($user_limit)));
}
@@ -619,7 +619,7 @@ function file_file_download($uri, $field_type = 'file') {
}
// Find out which (if any) fields of this type contain the file.
- $references = file_get_file_references($file, NULL, EntityStorageControllerInterface::FIELD_LOAD_CURRENT, $field_type);
+ $references = file_get_file_references($file, NULL, EntityStorageInterface::FIELD_LOAD_CURRENT, $field_type);
// Stop processing if there are no references in order to avoid returning
// headers for files controlled by other modules. Make an exception for
@@ -693,7 +693,7 @@ function file_file_download($uri, $field_type = 'file') {
* Implements file_cron()
*/
function file_cron() {
- $result = \Drupal::entityManager()->getStorageController('file')->retrieveTemporaryFiles();
+ $result = \Drupal::entityManager()->getStorage('file')->retrieveTemporaryFiles();
foreach ($result as $row) {
if ($file = file_load($row->fid)) {
$references = \Drupal::service('file.usage')->listUsage($file);
@@ -1843,9 +1843,9 @@ function file_icon_map(File $file) {
* reference check to the given field.
* @param $age
* (optional) A constant that specifies which references to count. Use
- * EntityStorageControllerInterface::FIELD_LOAD_REVISION to retrieve all
+ * EntityStorageInterface::FIELD_LOAD_REVISION to retrieve all
* references within all revisions or
- * EntityStorageControllerInterface::FIELD_LOAD_CURRENT to retrieve references
+ * EntityStorageInterface::FIELD_LOAD_CURRENT to retrieve references
* only in the current revisions.
* @param $field_type
* (optional) The name of a field type. If given, limits the reference check
@@ -1857,7 +1857,7 @@ function file_icon_map(File $file) {
* A multidimensional array. The keys are field_name, entity_type,
* entity_id and the value is an entity referencing this file.
*/
-function file_get_file_references(File $file, $field = NULL, $age = EntityStorageControllerInterface::FIELD_LOAD_REVISION, $field_type = 'file') {
+function file_get_file_references(File $file, $field = NULL, $age = EntityStorageInterface::FIELD_LOAD_REVISION, $field_type = 'file') {
$references = &drupal_static(__FUNCTION__, array());
$field_columns = &drupal_static(__FUNCTION__ . ':field_columns', array());
@@ -1871,7 +1871,7 @@ function file_get_file_references(File $file, $field = NULL, $age = EntityStorag
// The usage table contains usage of every revision. If we are looking
// for every revision or the entity does not support revisions then
// every usage is already a match.
- $match_entity_type = $age == EntityStorageControllerInterface::FIELD_LOAD_REVISION || !$entity_type->hasKey('revision');
+ $match_entity_type = $age == EntityStorageInterface::FIELD_LOAD_REVISION || !$entity_type->hasKey('revision');
$entities = entity_load_multiple($entity_type_id, array_keys($entity_ids));
foreach ($entities as $entity) {
$bundle = $entity->bundle();
diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc
index bd90aef..6c3ff40 100644
--- a/core/modules/file/file.views.inc
+++ b/core/modules/file/file.views.inc
@@ -5,7 +5,7 @@
* Provide views data for file.module.
*/
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\field\FieldConfigInterface;
/**
@@ -515,7 +515,7 @@ function file_field_views_data_views_data_alter(array &$data, FieldConfigInterfa
'id' => 'entity_reverse',
'field_name' => $field_name,
'entity_type' => $entity_type_id,
- 'field table' => FieldableDatabaseStorageController::_fieldTableName($field),
+ 'field table' => ContentEntityDatabaseStorage::_fieldTableName($field),
'field field' => $field_name . '_target_id',
'base' => $entity_type->getBaseTable(),
'base field' => $entity_type->getKey('id'),
diff --git a/core/modules/file/lib/Drupal/file/Entity/File.php b/core/modules/file/lib/Drupal/file/Entity/File.php
index 4618986..92e1e90 100644
--- a/core/modules/file/lib/Drupal/file/Entity/File.php
+++ b/core/modules/file/lib/Drupal/file/Entity/File.php
@@ -8,7 +8,7 @@
namespace Drupal\file\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Language\Language;
@@ -22,7 +22,7 @@ use Drupal\user\UserInterface;
* id = "file",
* label = @Translation("File"),
* controllers = {
- * "storage" = "Drupal\file\FileStorageController",
+ * "storage" = "Drupal\file\FileStorage",
* "view_builder" = "Drupal\Core\Entity\EntityViewBuilder"
* },
* base_table = "file_managed",
@@ -184,7 +184,7 @@ class File extends ContentEntityBase implements FileInterface {
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
// Automatically detect filename if not set.
if (!isset($values['filename']) && isset($values['uri'])) {
$values['filename'] = drupal_basename($values['uri']);
@@ -199,8 +199,8 @@ class File extends ContentEntityBase implements FileInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
$this->setSize(filesize($this->getFileUri()));
}
@@ -208,8 +208,8 @@ class File extends ContentEntityBase implements FileInterface {
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::preDelete($storage_controller, $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
+ parent::preDelete($storage, $entities);
foreach ($entities as $entity) {
// Delete all remaining references to this file.
diff --git a/core/modules/file/lib/Drupal/file/FileStorageController.php b/core/modules/file/lib/Drupal/file/FileStorage.php
index afa6b0b..c6f2ccc 100644
--- a/core/modules/file/lib/Drupal/file/FileStorageController.php
+++ b/core/modules/file/lib/Drupal/file/FileStorage.php
@@ -2,17 +2,17 @@
/**
* @file
- * Definition of Drupal\file\FileStorageController.
+ * Definition of Drupal\file\FileStorage.
*/
namespace Drupal\file;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
/**
- * File storage controller for files.
+ * File storage for files.
*/
-class FileStorageController extends FieldableDatabaseStorageController implements FileStorageControllerInterface {
+class FileStorage extends ContentEntityDatabaseStorage implements FileStorageInterface {
/**
* {@inheritdoc}
diff --git a/core/modules/file/lib/Drupal/file/FileStorageControllerInterface.php b/core/modules/file/lib/Drupal/file/FileStorageInterface.php
index 913d172..627d577 100644
--- a/core/modules/file/lib/Drupal/file/FileStorageControllerInterface.php
+++ b/core/modules/file/lib/Drupal/file/FileStorageInterface.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\file\FileStorageControllerInterface.
+ * Contains \Drupal\file\FileStorageInterface.
*/
namespace Drupal\file;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines a common interface for file entity controller classes.
*/
-interface FileStorageControllerInterface extends EntityStorageControllerInterface {
+interface FileStorageInterface extends EntityStorageInterface {
/**
* Determines total disk space used by a single user or the whole filesystem.
diff --git a/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileFieldItemList.php b/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileFieldItemList.php
index a250229..7777098 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileFieldItemList.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileFieldItemList.php
@@ -62,7 +62,7 @@ class FileFieldItemList extends FieldItemList {
// Decrement file usage by 1 for files that were removed from the field.
$removed_fids = array_filter(array_diff($original_fids, $fids));
- $removed_files = \Drupal::entityManager()->getStorageController('file')->loadMultiple($removed_fids);
+ $removed_files = \Drupal::entityManager()->getStorage('file')->loadMultiple($removed_fids);
foreach ($removed_files as $file) {
\Drupal::service('file.usage')->delete($file, 'file', $entity->getEntityTypeId(), $entity->id());
}
@@ -120,7 +120,7 @@ class FileFieldItemList extends FieldItemList {
// Prevent NULLs as target IDs.
$ids = array_filter($ids);
- return $ids ? \Drupal::entityManager()->getStorageController('file')->loadMultiple($ids) : array();
+ return $ids ? \Drupal::entityManager()->getStorage('file')->loadMultiple($ids) : array();
}
}
diff --git a/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php b/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php
index b8f5a36..dc6811c 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php
@@ -77,7 +77,7 @@ class Fid extends Numeric implements ContainerFactoryPluginInterface {
$fids = $this->entityQuery->get('file')
->condition('fid', $this->value)
->execute();
- $controller = $this->entityManager->getStorageController('file');
+ $controller = $this->entityManager->getStorage('file');
$files = $controller->loadMultiple($fids);
$titles = array();
foreach ($files as $file) {
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php
index 82d043a..a7df01d 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php
@@ -209,7 +209,7 @@ abstract class FileFieldTestBase extends WebTestBase {
* Asserts that a file exists in the database.
*/
function assertFileEntryExists($file, $message = NULL) {
- $this->container->get('entity.manager')->getStorageController('file')->resetCache();
+ $this->container->get('entity.manager')->getStorage('file')->resetCache();
$db_file = file_load($file->id());
$message = isset($message) ? $message : format_string('File %file exists in database at the correct path.', array('%file' => $file->getFileUri()));
$this->assertEqual($db_file->getFileUri(), $file->getFileUri(), $message);
@@ -227,7 +227,7 @@ abstract class FileFieldTestBase extends WebTestBase {
* Asserts that a file does not exist in the database.
*/
function assertFileEntryNotExists($file, $message) {
- $this->container->get('entity.manager')->getStorageController('file')->resetCache();
+ $this->container->get('entity.manager')->getStorage('file')->resetCache();
$message = isset($message) ? $message : format_string('File %file exists in database at the correct path.', array('%file' => $file->getFileUri()));
$this->assertFalse(file_load($file->id()), $message);
}
diff --git a/core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php b/core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php
index 325990e..a0c8e33 100644
--- a/core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php
@@ -43,7 +43,7 @@ class SpaceUsedTest extends FileManagedUnitTestBase {
* Test different users with the default status.
*/
function testFileSpaceUsed() {
- $file = $this->container->get('entity.manager')->getStorageController('file');
+ $file = $this->container->get('entity.manager')->getStorage('file');
// Test different users with default status.
$this->assertEqual($file->spaceUsed(2), 70);
$this->assertEqual($file->spaceUsed(3), 300);
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 062361b..166590e 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -164,7 +164,7 @@ function filter_formats(AccountInterface $account = NULL) {
$formats['all'] = $cache->data;
}
else {
- $formats['all'] = \Drupal::entityManager()->getStorageController('filter_format')->loadByProperties(array('status' => TRUE));
+ $formats['all'] = \Drupal::entityManager()->getStorage('filter_format')->loadByProperties(array('status' => TRUE));
uasort($formats['all'], 'Drupal\Core\Config\Entity\ConfigEntityBase::sort');
\Drupal::cache()->set("filter_formats:{$language_interface->id}", $formats['all'], Cache::PERMANENT, array('filter_formats' => TRUE));
}
diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
index 8e0aadd..4b36306 100644
--- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
+++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
@@ -10,7 +10,7 @@ namespace Drupal\filter\Entity;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\filter\FilterFormatInterface;
use Drupal\filter\FilterBag;
use Drupal\filter\Plugin\FilterInterface;
@@ -204,11 +204,11 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
+ public function preSave(EntityStorageInterface $storage) {
// Ensure the filters have been sorted before saving.
$this->filters()->sort();
- parent::preSave($storage_controller);
+ parent::preSave($storage);
$this->name = trim($this->label());
@@ -228,8 +228,8 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
// Clear the static caches of filter_formats() and others.
filter_formats_reset();
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatListBuilder.php b/core/modules/filter/lib/Drupal/filter/FilterFormatListBuilder.php
index 7ba51af..a22b998 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatListBuilder.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatListBuilder.php
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\String;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\Entity\DraggableListBuilder;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -39,12 +39,12 @@ class FilterFormatListBuilder extends DraggableListBuilder {
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, ConfigFactoryInterface $config_factory) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ConfigFactoryInterface $config_factory) {
parent::__construct($entity_type, $storage);
$this->configFactory = $config_factory;
@@ -56,7 +56,7 @@ class FilterFormatListBuilder extends DraggableListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('config.factory')
);
}
diff --git a/core/modules/forum/lib/Drupal/forum/Breadcrumb/ForumBreadcrumbBuilderBase.php b/core/modules/forum/lib/Drupal/forum/Breadcrumb/ForumBreadcrumbBuilderBase.php
index b2957c2..5f7ae62 100644
--- a/core/modules/forum/lib/Drupal/forum/Breadcrumb/ForumBreadcrumbBuilderBase.php
+++ b/core/modules/forum/lib/Drupal/forum/Breadcrumb/ForumBreadcrumbBuilderBase.php
@@ -64,7 +64,7 @@ abstract class ForumBreadcrumbBuilderBase extends BreadcrumbBuilderBase {
$breadcrumb[] = $this->l($this->t('Home'), '<front>');
$vocabulary = $this->entityManager
- ->getStorageController('taxonomy_vocabulary')
+ ->getStorage('taxonomy_vocabulary')
->load($this->config->get('vocabulary'));
$breadcrumb[] = $this->l($vocabulary->label(), 'forum.index');
diff --git a/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php b/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
index 01a2566..5de156c 100644
--- a/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
+++ b/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
@@ -10,8 +10,8 @@ namespace Drupal\forum\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\forum\ForumManagerInterface;
use Drupal\taxonomy\TermInterface;
-use Drupal\taxonomy\TermStorageControllerInterface;
-use Drupal\taxonomy\VocabularyStorageControllerInterface;
+use Drupal\taxonomy\TermStorageInterface;
+use Drupal\taxonomy\VocabularyStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -27,33 +27,33 @@ class ForumController extends ControllerBase {
protected $forumManager;
/**
- * Vocabulary storage controller.
+ * Vocabulary storage.
*
- * @var \Drupal\taxonomy\VocabularyStorageControllerInterface
+ * @var \Drupal\taxonomy\VocabularyStorageInterface
*/
- protected $vocabularyStorageController;
+ protected $vocabularyStorage;
/**
- * Term storage controller.
+ * Term storage.
*
- * @var \Drupal\taxonomy\TermStorageControllerInterface
+ * @var \Drupal\taxonomy\TermStorageInterface
*/
- protected $termStorageController;
+ protected $termStorage;
/**
* Constructs a ForumController object.
*
* @param \Drupal\forum\ForumManagerInterface $forum_manager
* The forum manager service.
- * @param \Drupal\taxonomy\VocabularyStorageControllerInterface $vocabulary_storage_controller
- * Vocabulary storage controller.
- * @param \Drupal\taxonomy\TermStorageControllerInterface $term_storage_controller
- * Term storage controller.
+ * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage
+ * Vocabulary storage.
+ * @param \Drupal\taxonomy\TermStorageInterface $term_storage
+ * Term storage.
*/
- public function __construct(ForumManagerInterface $forum_manager, VocabularyStorageControllerInterface $vocabulary_storage_controller, TermStorageControllerInterface $term_storage_controller) {
+ public function __construct(ForumManagerInterface $forum_manager, VocabularyStorageInterface $vocabulary_storage, TermStorageInterface $term_storage) {
$this->forumManager = $forum_manager;
- $this->vocabularyStorageController = $vocabulary_storage_controller;
- $this->termStorageController = $term_storage_controller;
+ $this->vocabularyStorage = $vocabulary_storage;
+ $this->termStorage = $term_storage;
}
/**
@@ -62,8 +62,8 @@ class ForumController extends ControllerBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('forum_manager'),
- $container->get('entity.manager')->getStorageController('taxonomy_vocabulary'),
- $container->get('entity.manager')->getStorageController('taxonomy_term')
+ $container->get('entity.manager')->getStorage('taxonomy_vocabulary'),
+ $container->get('entity.manager')->getStorage('taxonomy_term')
);
}
@@ -100,7 +100,7 @@ class ForumController extends ControllerBase {
* A render array.
*/
public function forumIndex() {
- $vocabulary = $this->vocabularyStorageController->load($this->config('forum.settings')->get('vocabulary'));
+ $vocabulary = $this->vocabularyStorage->load($this->config('forum.settings')->get('vocabulary'));
$index = $this->forumManager->getIndex();
$build = $this->build($index->forums, $index);
if (empty($index->forums)) {
@@ -159,7 +159,7 @@ class ForumController extends ControllerBase {
*/
public function addForum() {
$vid = $this->config('forum.settings')->get('vocabulary');
- $taxonomy_term = $this->termStorageController->create(array(
+ $taxonomy_term = $this->termStorage->create(array(
'vid' => $vid,
'forum_controller' => 0,
));
@@ -174,7 +174,7 @@ class ForumController extends ControllerBase {
*/
public function addContainer() {
$vid = $this->config('forum.settings')->get('vocabulary');
- $taxonomy_term = $this->termStorageController->create(array(
+ $taxonomy_term = $this->termStorage->create(array(
'vid' => $vid,
'forum_container' => 1,
));
diff --git a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php b/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php
index fe0d5a2..fc12225 100644
--- a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php
+++ b/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php
@@ -76,7 +76,7 @@ class ForumFormController extends TermFormController {
*/
public function save(array $form, array &$form_state) {
$term = $this->entity;
- $term_storage = $this->entityManager->getStorageController('taxonomy_term');
+ $term_storage = $this->entityManager->getStorage('taxonomy_term');
$status = $term_storage->save($term);
switch ($status) {
diff --git a/core/modules/forum/lib/Drupal/forum/Form/Overview.php b/core/modules/forum/lib/Drupal/forum/Form/Overview.php
index d31387c..b2e84e7 100644
--- a/core/modules/forum/lib/Drupal/forum/Form/Overview.php
+++ b/core/modules/forum/lib/Drupal/forum/Form/Overview.php
@@ -62,7 +62,7 @@ class Overview extends OverviewTerms {
public function buildForm(array $form, array &$form_state) {
$forum_config = $this->config('forum.settings');
$vid = $forum_config->get('vocabulary');
- $vocabulary = $this->entityManager->getStorageController('taxonomy_vocabulary')->load($vid);
+ $vocabulary = $this->entityManager->getStorage('taxonomy_vocabulary')->load($vid);
if (!$vocabulary) {
throw new NotFoundHttpException();
}
diff --git a/core/modules/forum/lib/Drupal/forum/ForumManager.php b/core/modules/forum/lib/Drupal/forum/ForumManager.php
index fc3f933..388dd4a 100644
--- a/core/modules/forum/lib/Drupal/forum/ForumManager.php
+++ b/core/modules/forum/lib/Drupal/forum/ForumManager.php
@@ -180,7 +180,7 @@ class ForumManager extends DependencySerialization implements ForumManagerInterf
$nids[] = $record->nid;
}
if ($nids) {
- $nodes = $this->entityManager->getStorageController('node')->loadMultiple($nids);
+ $nodes = $this->entityManager->getStorage('node')->loadMultiple($nids);
$query = $this->connection->select('node_field_data', 'n')
->extend('Drupal\Core\Database\Query\TableSortExtender');
@@ -452,7 +452,7 @@ class ForumManager extends DependencySerialization implements ForumManagerInterf
}
$vid = $this->configFactory->get('forum.settings')->get('vocabulary');
- $index = $this->entityManager->getStorageController('taxonomy_term')->create(array(
+ $index = $this->entityManager->getStorage('taxonomy_term')->create(array(
'tid' => 0,
'container' => 1,
'parents' => array(),
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
index d7f8dd0..c7d8b64 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
@@ -395,7 +395,7 @@ class ForumTest extends WebTestBase {
$parent_tid = db_query("SELECT t.parent FROM {taxonomy_term_hierarchy} t WHERE t.tid = :tid", array(':tid' => $tid))->fetchField();
$this->assertTrue($parent == $parent_tid, 'The ' . $type . ' is linked to its container');
- $forum = $this->container->get('entity.manager')->getStorageController('taxonomy_term')->load($tid);
+ $forum = $this->container->get('entity.manager')->getStorage('taxonomy_term')->load($tid);
$this->assertEqual(($type == 'forum container'), (bool) $forum->forum_container->value);
return $term;
}
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/Views/ForumIntegrationTest.php b/core/modules/forum/lib/Drupal/forum/Tests/Views/ForumIntegrationTest.php
index a5b2a75..65d9f1b 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/Views/ForumIntegrationTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/Views/ForumIntegrationTest.php
@@ -51,10 +51,10 @@ class ForumIntegrationTest extends ViewTestBase {
public function testForumIntegration() {
// Create a forum.
$entity_manager = $this->container->get('entity.manager');
- $term = $entity_manager->getStorageController('taxonomy_term')->create(array('vid' => 'forums'));
+ $term = $entity_manager->getStorage('taxonomy_term')->create(array('vid' => 'forums'));
$term->save();
- $comment_storage_controller = $entity_manager->getStorageController('comment');
+ $comment_storage = $entity_manager->getStorage('comment');
// Create some nodes which are part of this forum with some comments.
$nodes = array();
@@ -69,7 +69,7 @@ class ForumIntegrationTest extends ViewTestBase {
$comments = array();
foreach ($nodes as $index => $node) {
for ($i = 0; $i <= $index; $i++) {
- $comment = $comment_storage_controller->create(array('entity_type' => 'node', 'entity_id' => $node->id(), 'field_name' => 'comment_forum'));
+ $comment = $comment_storage->create(array('entity_type' => 'node', 'entity_id' => $node->id(), 'field_name' => 'comment_forum'));
$comment->save();
$comments[$comment->get('entity_id')->target_id][$comment->id()] = $comment;
}
diff --git a/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php b/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php
index 432b240..22d3618 100644
--- a/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php
+++ b/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php
@@ -94,8 +94,8 @@ class ForumBreadcrumbBuilderBaseTest extends UnitTestCase {
->method('label')
->will($this->returnValue('Fora_is_the_plural_of_forum'));
- $vocab_storage_controller = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
- $vocab_storage_controller->expects($this->any())
+ $vocab_storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+ $vocab_storage->expects($this->any())
->method('load')
->will($this->returnValueMap(array(
array('forums', $vocab_item),
@@ -105,9 +105,9 @@ class ForumBreadcrumbBuilderBaseTest extends UnitTestCase {
->disableOriginalConstructor()
->getMock();
$entity_manager->expects($this->any())
- ->method('getStorageController')
+ ->method('getStorage')
->will($this->returnValueMap(array(
- array('taxonomy_vocabulary', $vocab_storage_controller),
+ array('taxonomy_vocabulary', $vocab_storage),
)));
$config_factory = $this->getConfigFactoryStub(
diff --git a/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumListingBreadcrumbBuilderTest.php b/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumListingBreadcrumbBuilderTest.php
index 9a9ed4c..2aa2804 100644
--- a/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumListingBreadcrumbBuilderTest.php
+++ b/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumListingBreadcrumbBuilderTest.php
@@ -152,8 +152,8 @@ class ForumListingBreadcrumbBuilderTest extends UnitTestCase {
$vocab_item->expects($this->any())
->method('label')
->will($this->returnValue('Fora_is_the_plural_of_forum'));
- $vocab_storage_controller = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
- $vocab_storage_controller->expects($this->any())
+ $vocab_storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+ $vocab_storage->expects($this->any())
->method('load')
->will($this->returnValueMap(array(
array('forums', $vocab_item),
@@ -163,9 +163,9 @@ class ForumListingBreadcrumbBuilderTest extends UnitTestCase {
->disableOriginalConstructor()
->getMock();
$entity_manager->expects($this->any())
- ->method('getStorageController')
+ ->method('getStorage')
->will($this->returnValueMap(array(
- array('taxonomy_vocabulary', $vocab_storage_controller),
+ array('taxonomy_vocabulary', $vocab_storage),
)));
$config_factory = $this->getConfigFactoryStub(
diff --git a/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php b/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php
index 9e9d957..4a12d0d 100644
--- a/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php
+++ b/core/modules/forum/tests/Drupal/forum/Tests/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php
@@ -160,8 +160,8 @@ class ForumNodeBreadcrumbBuilderTest extends UnitTestCase {
$vocab_item->expects($this->any())
->method('label')
->will($this->returnValue('Forums'));
- $vocab_storage_controller = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
- $vocab_storage_controller->expects($this->any())
+ $vocab_storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+ $vocab_storage->expects($this->any())
->method('load')
->will($this->returnValueMap(array(
array('forums', $vocab_item),
@@ -171,9 +171,9 @@ class ForumNodeBreadcrumbBuilderTest extends UnitTestCase {
->disableOriginalConstructor()
->getMock();
$entity_manager->expects($this->any())
- ->method('getStorageController')
+ ->method('getStorage')
->will($this->returnValueMap(array(
- array('taxonomy_vocabulary', $vocab_storage_controller),
+ array('taxonomy_vocabulary', $vocab_storage),
)));
$config_factory = $this->getConfigFactoryStub(
diff --git a/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php b/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php
index b0aa836..e1d4a0a 100644
--- a/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php
+++ b/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php
@@ -33,7 +33,7 @@ class ForumManagerTest extends UnitTestCase {
public function testGetIndex() {
$entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
- $storage_controller = $this->getMockBuilder('\Drupal\taxonomy\VocabularyStorageController')
+ $storage = $this->getMockBuilder('\Drupal\taxonomy\VocabularyStorage')
->disableOriginalConstructor()
->getMock();
@@ -52,13 +52,13 @@ class ForumManagerTest extends UnitTestCase {
->will($this->returnValue('forums'));
$entity_manager->expects($this->once())
- ->method('getStorageController')
- ->will($this->returnValue($storage_controller));
+ ->method('getStorage')
+ ->will($this->returnValue($storage));
// This is sufficient for testing purposes.
$term = new \stdClass();
- $storage_controller->expects($this->once())
+ $storage->expects($this->once())
->method('create')
->will($this->returnValue($term));
diff --git a/core/modules/hal/lib/Drupal/hal/Normalizer/ContentEntityNormalizer.php b/core/modules/hal/lib/Drupal/hal/Normalizer/ContentEntityNormalizer.php
index 8334725..f374fa3 100644
--- a/core/modules/hal/lib/Drupal/hal/Normalizer/ContentEntityNormalizer.php
+++ b/core/modules/hal/lib/Drupal/hal/Normalizer/ContentEntityNormalizer.php
@@ -149,7 +149,7 @@ class ContentEntityNormalizer extends NormalizerBase {
unset($data[$bundle_key]);
}
- $entity = $this->entityManager->getStorageController($typed_data_ids['entity_type'])->create($values);
+ $entity = $this->entityManager->getStorage($typed_data_ids['entity_type'])->create($values);
// Special handling for PATCH: destroy all possible default values that
// might have been set on entity creation. We want an "empty" entity that
diff --git a/core/modules/hal/lib/Drupal/hal/Normalizer/FileEntityNormalizer.php b/core/modules/hal/lib/Drupal/hal/Normalizer/FileEntityNormalizer.php
index 36b650d..03c0292 100644
--- a/core/modules/hal/lib/Drupal/hal/Normalizer/FileEntityNormalizer.php
+++ b/core/modules/hal/lib/Drupal/hal/Normalizer/FileEntityNormalizer.php
@@ -71,7 +71,7 @@ class FileEntityNormalizer extends ContentEntityNormalizer {
$path = 'temporary://' . drupal_basename($data['uri'][0]['value']);
$data['uri'] = file_unmanaged_save_data($file_data, $path);
- return $this->entityManager->getStorageController('file')->create($data);
+ return $this->entityManager->getStorage('file')->create($data);
}
}
diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc
index 57a3943..fe2d59a 100644
--- a/core/modules/image/image.views.inc
+++ b/core/modules/image/image.views.inc
@@ -5,7 +5,7 @@
* Provide views data for image.module.
*/
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\field\FieldConfigInterface;
/**
@@ -50,7 +50,7 @@ function image_field_views_data_views_data_alter(array &$data, FieldConfigInterf
'id' => 'entity_reverse',
'field_name' => $field_name,
'entity_type' => $entity_type_id,
- 'field table' => FieldableDatabaseStorageController::_fieldTableName($field),
+ 'field table' => ContentEntityDatabaseStorage::_fieldTableName($field),
'field field' => $field_name . '_target_id',
'base' => $entity_type->getBaseTable(),
'base field' => $entity_type->getKey('id'),
diff --git a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php
index 50c3eb4..7bd7537 100644
--- a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php
+++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php
@@ -9,7 +9,7 @@ namespace Drupal\image\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\image\ImageEffectBag;
use Drupal\image\ImageEffectInterface;
use Drupal\image\ImageStyleInterface;
@@ -97,8 +97,8 @@ class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, Entity
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if ($update) {
if (!empty($this->original) && $this->id() !== $this->original->id()) {
@@ -117,8 +117,8 @@ class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, Entity
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
foreach ($entities as $style) {
// Flush cached media for the deleted style.
diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php
index 41465a2..7b125d6 100644
--- a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php
+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php
@@ -8,7 +8,7 @@
namespace Drupal\image\Form;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\image\ConfigurableImageEffectInterface;
use Drupal\image\ImageEffectManager;
use Drupal\Component\Utility\String;
@@ -29,12 +29,12 @@ class ImageStyleEditForm extends ImageStyleFormBase {
/**
* Constructs an ImageStyleEditForm object.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $image_style_storage
- * The storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $image_style_storage
+ * The storage.
* @param \Drupal\image\ImageEffectManager $image_effect_manager
* The image effect manager service.
*/
- public function __construct(EntityStorageControllerInterface $image_style_storage, ImageEffectManager $image_effect_manager) {
+ public function __construct(EntityStorageInterface $image_style_storage, ImageEffectManager $image_effect_manager) {
parent::__construct($image_style_storage);
$this->imageEffectManager = $image_effect_manager;
}
@@ -44,7 +44,7 @@ class ImageStyleEditForm extends ImageStyleFormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('image_style'),
+ $container->get('entity.manager')->getStorage('image_style'),
$container->get('plugin.manager.image.effect')
);
}
diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php
index 430b802..1547ca7 100644
--- a/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php
+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php
@@ -8,7 +8,7 @@
namespace Drupal\image\Form;
use Drupal\Core\Entity\EntityFormController;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -17,19 +17,19 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ImageStyleFormBase extends EntityFormController {
/**
- * The image style entity storage controller.
+ * The image style entity storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $imageStyleStorage;
/**
* Constructs a base class for image style add and edit forms.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $image_style_storage
- * The image style entity storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $image_style_storage
+ * The image style entity storage.
*/
- public function __construct(EntityStorageControllerInterface $image_style_storage) {
+ public function __construct(EntityStorageInterface $image_style_storage) {
$this->imageStyleStorage = $image_style_storage;
}
@@ -38,7 +38,7 @@ abstract class ImageStyleFormBase extends EntityFormController {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('image_style')
+ $container->get('entity.manager')->getStorage('image_style')
);
}
diff --git a/core/modules/image/lib/Drupal/image/ImageStyleListBuilder.php b/core/modules/image/lib/Drupal/image/ImageStyleListBuilder.php
index e6eac9e..2b98b07 100644
--- a/core/modules/image/lib/Drupal/image/ImageStyleListBuilder.php
+++ b/core/modules/image/lib/Drupal/image/ImageStyleListBuilder.php
@@ -9,7 +9,7 @@ namespace Drupal\image;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Routing\UrlGeneratorInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -33,12 +33,12 @@ class ImageStyleListBuilder extends ConfigEntityListBuilder {
*
* @param EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $image_style_storage
- * The image style entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $image_style_storage
+ * The image style entity storage class.
* @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
* The URL generator.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $image_style_storage, UrlGeneratorInterface $url_generator) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $image_style_storage, UrlGeneratorInterface $url_generator) {
parent::__construct($entity_type, $image_style_storage);
$this->urlGenerator = $url_generator;
}
@@ -49,7 +49,7 @@ class ImageStyleListBuilder extends ConfigEntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('url_generator'),
$container->get('string_translation')
);
diff --git a/core/modules/language/lib/Drupal/language/Entity/Language.php b/core/modules/language/lib/Drupal/language/Entity/Language.php
index 244607f..77015cd 100644
--- a/core/modules/language/lib/Drupal/language/Entity/Language.php
+++ b/core/modules/language/lib/Drupal/language/Entity/Language.php
@@ -8,7 +8,7 @@
namespace Drupal\language\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\language\Exception\DeleteDefaultLanguageException;
use Drupal\language\LanguageInterface;
@@ -80,8 +80,8 @@ class Language extends ConfigEntityBase implements LanguageInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
// Languages are picked from a predefined list which is given in English.
// For the uncommon case of custom languages the label should be given in
// English.
@@ -93,7 +93,7 @@ class Language extends ConfigEntityBase implements LanguageInterface {
*
* @throws \RuntimeException
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
$default_language = \Drupal::service('language.default')->get();
foreach ($entities as $entity) {
if ($entity->id() == $default_language->id && !$entity->isUninstalling()) {
diff --git a/core/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php b/core/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php
index 1be52d5..12fc40a 100644
--- a/core/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php
+++ b/core/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php
@@ -513,7 +513,7 @@ class LinkFieldTest extends WebTestBase {
*/
protected function renderTestEntity($id, $view_mode = 'full', $reset = TRUE) {
if ($reset) {
- $this->container->get('entity.manager')->getStorageController('entity_test')->resetCache(array($id));
+ $this->container->get('entity.manager')->getStorage('entity_test')->resetCache(array($id));
}
$entity = entity_load('entity_test', $id);
$display = entity_get_display($entity->getEntityTypeId(), $entity->bundle(), $view_mode);
diff --git a/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php b/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php
index ae41db1..3c0dc57 100644
--- a/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php
+++ b/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php
@@ -21,7 +21,7 @@ use Drupal\language\ConfigurableLanguageManagerInterface;
class LocaleConfigManager extends TypedConfigManager {
/**
- * A storage controller instance for reading default configuration data.
+ * A storage instance for reading default configuration data.
*
* @var \Drupal\Core\Config\StorageInterface
*/
@@ -57,11 +57,11 @@ class LocaleConfigManager extends TypedConfigManager {
* Creates a new typed configuration manager.
*
* @param \Drupal\Core\Config\StorageInterface $configStorage
- * The storage controller object to use for reading configuration data.
+ * The storage object to use for reading configuration data.
* @param \Drupal\Core\Config\StorageInterface $schemaStorage
- * The storage controller object to use for reading schema data.
+ * The storage object to use for reading schema data.
* @param \Drupal\Core\Config\StorageInterface $installStorage
- * The storage controller object to use for reading default configuration
+ * The storage object to use for reading default configuration
* data.
* @param \Drupal\locale\StringStorageInterface $localeStorage
* The locale storage to use for reading string translations.
diff --git a/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php b/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php
index f2ef6ba..4dacd6a 100644
--- a/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php
+++ b/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php
@@ -68,7 +68,7 @@ class LocaleAdminPathConfigEntityConverter extends EntityConverter {
*/
public function convert($value, $definition, $name, array $defaults, Request $request) {
$entity_type = substr($definition['type'], strlen('entity:'));
- if ($storage = $this->entityManager->getStorageController($entity_type)) {
+ if ($storage = $this->entityManager->getStorage($entity_type)) {
// Make sure no overrides are loaded.
$old_state = $this->configFactory->getOverrideState();
$this->configFactory->setOverrideState(FALSE);
diff --git a/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php b/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php
index 0b77263..22f4f00 100644
--- a/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php
+++ b/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php
@@ -49,7 +49,7 @@ class MenuController extends ControllerBase {
* Returns the menu link submission form.
*/
public function addLink(MenuInterface $menu) {
- $menu_link = $this->entityManager()->getStorageController('menu_link')->create(array(
+ $menu_link = $this->entityManager()->getStorage('menu_link')->create(array(
'mlid' => 0,
'plid' => 0,
'menu_name' => $menu->id(),
diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php
index c30d207..31576df 100644
--- a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php
+++ b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php
@@ -9,7 +9,7 @@ namespace Drupal\menu\Form;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityConfirmFormBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -18,11 +18,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class MenuDeleteForm extends EntityConfirmFormBase {
/**
- * The menu link storage controller.
+ * The menu link storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* The database connection.
@@ -34,13 +34,13 @@ class MenuDeleteForm extends EntityConfirmFormBase {
/**
* Constructs a new MenuDeleteForm.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The menu link storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The menu link storage.
* @param \Drupal\Core\Database\Connection $connection
* The database connection.
*/
- public function __construct(EntityStorageControllerInterface $storage_controller, Connection $connection) {
- $this->storageController = $storage_controller;
+ public function __construct(EntityStorageInterface $storage, Connection $connection) {
+ $this->storage = $storage;
$this->connection = $connection;
}
@@ -49,7 +49,7 @@ class MenuDeleteForm extends EntityConfirmFormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('menu_link'),
+ $container->get('entity.manager')->getStorage('menu_link'),
$container->get('database')
);
}
@@ -78,7 +78,7 @@ class MenuDeleteForm extends EntityConfirmFormBase {
*/
public function getDescription() {
$caption = '';
- $num_links = $this->storageController->countMenuLinks($this->entity->id());
+ $num_links = $this->storage->countMenuLinks($this->entity->id());
if ($num_links) {
$caption .= '<p>' . format_plural($num_links, '<strong>Warning:</strong> There is currently 1 menu link in %title. It will be deleted (system-defined items will be reset).', '<strong>Warning:</strong> There are currently @count menu links in %title. They will be deleted (system-defined links will be reset).', array('%title' => $this->entity->label())) . '</p>';
}
@@ -110,13 +110,13 @@ class MenuDeleteForm extends EntityConfirmFormBase {
->condition('module', 'system')
->sort('depth', 'ASC')
->execute();
- $menu_links = $this->storageController->loadMultiple($result);
+ $menu_links = $this->storage->loadMultiple($result);
foreach ($menu_links as $link) {
$link->reset();
}
// Delete all links to the overview page for this menu.
- $menu_links = $this->storageController->loadByProperties(array('link_path' => 'admin/structure/menu/manage/' . $this->entity->id()));
+ $menu_links = $this->storage->loadByProperties(array('link_path' => 'admin/structure/menu/manage/' . $this->entity->id()));
menu_link_delete_multiple(array_keys($menu_links));
// Delete the custom menu and all its menu links.
diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php
index fd3f123..9e0cfa9 100644
--- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php
+++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\EntityFormController;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\Core\Language\Language;
-use Drupal\menu_link\MenuLinkStorageControllerInterface;
+use Drupal\menu_link\MenuLinkStorageInterface;
use Drupal\menu_link\MenuTreeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -28,9 +28,9 @@ class MenuFormController extends EntityFormController {
protected $entityQueryFactory;
/**
- * The menu link storage controller.
+ * The menu link storage.
*
- * @var \Drupal\menu_link\MenuLinkStorageControllerInterface
+ * @var \Drupal\menu_link\MenuLinkStorageInterface
*/
protected $menuLinkStorage;
@@ -53,12 +53,12 @@ class MenuFormController extends EntityFormController {
*
* @param \Drupal\Core\Entity\Query\QueryFactory $entity_query_factory
* The factory for entity queries.
- * @param \Drupal\menu_link\MenuLinkStorageControllerInterface $menu_link_storage
- * The menu link storage controller.
+ * @param \Drupal\menu_link\MenuLinkStorageInterface $menu_link_storage
+ * The menu link storage.
* @param \Drupal\menu_link\MenuTreeInterface $menu_tree
* The menu tree service.
*/
- public function __construct(QueryFactory $entity_query_factory, MenuLinkStorageControllerInterface $menu_link_storage, MenuTreeInterface $menu_tree) {
+ public function __construct(QueryFactory $entity_query_factory, MenuLinkStorageInterface $menu_link_storage, MenuTreeInterface $menu_tree) {
$this->entityQueryFactory = $entity_query_factory;
$this->menuLinkStorage = $menu_link_storage;
$this->menuTree = $menu_tree;
@@ -70,7 +70,7 @@ class MenuFormController extends EntityFormController {
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity.query'),
- $container->get('entity.manager')->getStorageController('menu_link'),
+ $container->get('entity.manager')->getStorage('menu_link'),
$container->get('menu_link.tree')
);
}
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index beae839..e89feb8 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -17,7 +17,7 @@ use Drupal\node\NodeTypeInterface;
use Drupal\system\Entity\Menu;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\menu_link\Entity\MenuLink;
-use Drupal\menu_link\MenuLinkStorageController;
+use Drupal\menu_link\MenuLinkStorage;
use Drupal\node\NodeInterface;
/**
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 36705d5..0c7da03 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
@@ -9,7 +9,7 @@ namespace Drupal\menu_link\Entity;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\Entity;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Url;
use Drupal\menu_link\MenuLinkInterface;
use Symfony\Component\Routing\Route;
@@ -21,7 +21,7 @@ use Symfony\Component\Routing\Route;
* id = "menu_link",
* label = @Translation("Menu link"),
* controllers = {
- * "storage" = "Drupal\menu_link\MenuLinkStorageController",
+ * "storage" = "Drupal\menu_link\MenuLinkStorage",
* "access" = "Drupal\menu_link\MenuLinkAccessController",
* "form" = {
* "default" = "Drupal\menu_link\MenuLinkFormController"
@@ -306,7 +306,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- public function preSaveRevision(EntityStorageControllerInterface $storage_controller, \stdClass $record) {
+ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
}
/**
@@ -366,9 +366,9 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
$all_links = menu_link_get_defaults();
$original = $all_links[$this->machine_name];
$original['machine_name'] = $this->machine_name;
- /** @var \Drupal\menu_link\MenuLinkStorageControllerInterface $storage_controller */
- $storage_controller = \Drupal::entityManager()->getStorageController($this->entityTypeId);
- $new_link = $storage_controller->createFromDefaultLink($original);
+ /** @var \Drupal\menu_link\MenuLinkStorageInterface $storage */
+ $storage = \Drupal::entityManager()->getStorage($this->entityTypeId);
+ $new_link = $storage->createFromDefaultLink($original);
// Merge existing menu link's ID and 'has_children' property.
foreach (array('mlid', 'has_children') as $key) {
$new_link->{$key} = $this->{$key};
@@ -408,21 +408,21 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::preDelete($storage_controller, $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
+ parent::preDelete($storage, $entities);
// Nothing to do if we don't want to reparent children.
- if ($storage_controller->getPreventReparenting()) {
+ if ($storage->getPreventReparenting()) {
return;
}
foreach ($entities as $entity) {
// Children get re-attached to the item's parent.
if ($entity->has_children) {
- $children = $storage_controller->loadByProperties(array('plid' => $entity->plid));
+ $children = $storage->loadByProperties(array('plid' => $entity->plid));
foreach ($children as $child) {
$child->plid = $entity->plid;
- $storage_controller->save($child);
+ $storage->save($child);
}
}
}
@@ -431,14 +431,14 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
$affected_menus = array();
// Update the has_children status of the parent.
foreach ($entities as $entity) {
- if (!$storage_controller->getPreventReparenting()) {
- $storage_controller->updateParentalStatus($entity);
+ if (!$storage->getPreventReparenting()) {
+ $storage->updateParentalStatus($entity);
}
// Store all menu names for which we need to clear the cache.
@@ -456,15 +456,15 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
// This is the easiest way to handle the unique internal path '<front>',
// since a path marked as external does not need to match a route.
$this->external = (url_is_external($this->link_path) || $this->link_path == '<front>') ? 1 : 0;
// Try to find a parent link. If found, assign it and derive its menu.
- $parent = $this->findParent($storage_controller);
+ $parent = $this->findParent($storage);
if ($parent) {
$this->plid = $parent->id();
$this->menu_name = $parent->menu_name;
@@ -487,7 +487,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
// and fill parents based on the parent link.
else {
if ($this->has_children && $this->original) {
- $limit = MENU_MAX_DEPTH - $storage_controller->findChildrenRelativeDepth($this->original) - 1;
+ $limit = MENU_MAX_DEPTH - $storage->findChildrenRelativeDepth($this->original) - 1;
}
else {
$limit = MENU_MAX_DEPTH - 1;
@@ -501,7 +501,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
// Need to check both plid and menu_name, since plid can be 0 in any menu.
if (isset($this->original) && ($this->plid != $this->original->plid || $this->menu_name != $this->original->menu_name)) {
- $storage_controller->moveChildren($this);
+ $storage->moveChildren($this);
}
// Find the route_name.
@@ -518,11 +518,11 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
// Check the has_children status of the parent.
- $storage_controller->updateParentalStatus($this);
+ $storage->updateParentalStatus($this);
Cache::invalidateTags(array('menu' => $this->menu_name));
if (isset($this->original) && $this->menu_name != $this->original->menu_name) {
@@ -538,8 +538,8 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- public static function postLoad(EntityStorageControllerInterface $storage_controller, array &$entities) {
- parent::postLoad($storage_controller, $entities);
+ public static function postLoad(EntityStorageInterface $storage, array &$entities) {
+ parent::postLoad($storage, $entities);
$routes = array();
foreach ($entities as $menu_link) {
@@ -589,7 +589,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
/**
* {@inheritdoc}
*/
- protected function findParent(EntityStorageControllerInterface $storage_controller) {
+ protected function findParent(EntityStorageInterface $storage) {
$parent = FALSE;
// This item is explicitely top-level, skip the rest of the parenting.
@@ -612,7 +612,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
}
foreach ($candidates as $mlid) {
- $parent = $storage_controller->load($mlid);
+ $parent = $storage->load($mlid);
if ($parent) {
break;
}
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
index e3c43a8..3f4617e 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
@@ -11,7 +11,7 @@ use Drupal\Core\Entity\EntityFormController;
use Drupal\Core\Language\Language;
use Drupal\Core\Path\AliasManagerInterface;
use Drupal\Core\Routing\UrlGenerator;
-use Drupal\menu_link\MenuLinkStorageControllerInterface;
+use Drupal\menu_link\MenuLinkStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -20,11 +20,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class MenuLinkFormController extends EntityFormController {
/**
- * The menu link storage controller.
+ * The menu link storage.
*
- * @var \Drupal\menu_link\MenuLinkStorageControllerInterface
+ * @var \Drupal\menu_link\MenuLinkStorageInterface
*/
- protected $menuLinkStorageController;
+ protected $menuLinkStorage;
/**
* The path alias manager.
@@ -43,15 +43,15 @@ class MenuLinkFormController extends EntityFormController {
/**
* Constructs a new MenuLinkFormController object.
*
- * @param \Drupal\menu_link\MenuLinkStorageControllerInterface $menu_link_storage_controller
+ * @param \Drupal\menu_link\MenuLinkStorageInterface $menu_link_storage
* The menu link storage.
* @param \Drupal\Core\Path\AliasManagerInterface $path_alias_manager
* The path alias manager.
* @param \Drupal\Core\Routing\UrlGenerator $url_generator
* The URL generator.
*/
- public function __construct(MenuLinkStorageControllerInterface $menu_link_storage_controller, AliasManagerInterface $path_alias_manager, UrlGenerator $url_generator) {
- $this->menuLinkStorageController = $menu_link_storage_controller;
+ public function __construct(MenuLinkStorageInterface $menu_link_storage, AliasManagerInterface $path_alias_manager, UrlGenerator $url_generator) {
+ $this->menuLinkStorage = $menu_link_storage;
$this->pathAliasManager = $path_alias_manager;
$this->urlGenerator = $url_generator;
}
@@ -61,7 +61,7 @@ class MenuLinkFormController extends EntityFormController {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('menu_link'),
+ $container->get('entity.manager')->getStorage('menu_link'),
$container->get('path.alias_manager.cached'),
$container->get('url_generator')
);
@@ -152,7 +152,7 @@ class MenuLinkFormController extends EntityFormController {
);
// Get number of items in menu so the weight selector is sized appropriately.
- $delta = $this->menuLinkStorageController->countMenuLinks($menu_link->menu_name);
+ $delta = $this->menuLinkStorage->countMenuLinks($menu_link->menu_name);
$form['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight'),
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkInterface.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkInterface.php
index 9ecb321..fdfab67 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkInterface.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkInterface.php
@@ -26,7 +26,7 @@ interface MenuLinkInterface extends EntityInterface {
/**
* Sets the route object for this link.
*
- * This should only be called by MenuLinkStorageController when loading
+ * This should only be called by MenuLinkStorage when loading
* the link object. Calling it at other times could result in unpredictable
* behavior.
*
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php
index 4c420c3..64f7ed6 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php
@@ -2,22 +2,22 @@
/**
* @file
- * Contains \Drupal\menu_link\MenuLinkStorageController.
+ * Contains \Drupal\menu_link\MenuLinkStorage.
*/
namespace Drupal\menu_link;
-use Drupal\Core\Entity\DatabaseStorageController;
+use Drupal\Core\Entity\EntityDatabaseStorage;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityStorageException;
/**
* Controller class for menu links.
*
- * This extends the Drupal\entity\DatabaseStorageController class, adding
+ * This extends the Drupal\entity\EntityDatabaseStorage class, adding
* required special handling for menu_link entities.
*/
-class MenuLinkStorageController extends DatabaseStorageController implements MenuLinkStorageControllerInterface {
+class MenuLinkStorage extends EntityDatabaseStorage implements MenuLinkStorageInterface {
/**
* Indicates whether the delete operation should re-parent children items.
@@ -39,7 +39,7 @@ class MenuLinkStorageController extends DatabaseStorageController implements Men
}
/**
- * Overrides DatabaseStorageController::save().
+ * {@inheritdoc}
*/
public function save(EntityInterface $entity) {
@@ -64,7 +64,7 @@ class MenuLinkStorageController extends DatabaseStorageController implements Men
$entity->enforceIsNew();
}
- // Unlike the save() method from DatabaseStorageController, we invoke the
+ // Unlike the save() method from EntityDatabaseStorage, we invoke the
// 'presave' hook first because we want to allow modules to alter the
// entity before all the logic from our preSave() method.
$this->invokeHook('presave', $entity);
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageInterface.php
index b219834..4a9d719 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageInterface.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains \Drupal\menu_link\MenuLinkStorageControllerInterface.
+ * Contains \Drupal\menu_link\MenuLinkStorageInterface.
*/
namespace Drupal\menu_link;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines a common interface for menu link entity controller classes.
*/
-interface MenuLinkStorageControllerInterface extends EntityStorageControllerInterface {
+interface MenuLinkStorageInterface extends EntityStorageInterface {
/**
* Sets an internal flag that allows us to prevent the reparenting operations
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php
index b0a69f6..ecf756a 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php
@@ -52,9 +52,9 @@ class MenuTree implements MenuTreeInterface {
protected $requestStack;
/**
- * The menu link storage controller.
+ * The menu link storage.
*
- * @var \Drupal\menu_link\MenuLinkStorageControllerInterface
+ * @var \Drupal\menu_link\MenuLinkStorageInterface
*/
protected $menuLinkStorage;
@@ -139,7 +139,7 @@ class MenuTree implements MenuTreeInterface {
$this->cache = $cache_backend;
$this->languageManager = $language_manager;
$this->requestStack = $request_stack;
- $this->menuLinkStorage = $entity_manager->getStorageController('menu_link');
+ $this->menuLinkStorage = $entity_manager->getStorage('menu_link');
$this->queryFactory = $entity_query_factory;
$this->state = $state;
}
diff --git a/core/modules/menu_link/menu_link.module b/core/modules/menu_link/menu_link.module
index dc86f4c..2c63de0 100644
--- a/core/modules/menu_link/menu_link.module
+++ b/core/modules/menu_link/menu_link.module
@@ -100,7 +100,7 @@ function menu_link_delete_multiple(array $mlids, $force = FALSE, $prevent_repare
}
$controller = \Drupal::entityManager()
- ->getStorageController('menu_link');
+ ->getStorage('menu_link');
if (!$force) {
$entity_query = \Drupal::entityQuery('menu_link');
$group = $entity_query->orConditionGroup()
@@ -155,7 +155,7 @@ function menu_link_save(MenuLink $menu_link) {
*/
function menu_link_maintain($module, $op, $link_path, $link_title = NULL) {
$menu_link_controller = \Drupal::entityManager()
- ->getStorageController('menu_link');
+ ->getStorage('menu_link');
switch ($op) {
case 'insert':
$menu_link = entity_create('menu_link', array(
diff --git a/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php b/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php
index a1bacdc..5adea09 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php
@@ -23,7 +23,7 @@ use Drupal\migrate\Plugin\RequirementsInterface;
* label = @Translation("Migration"),
* module = "migrate",
* controllers = {
- * "storage" = "Drupal\migrate\MigrationStorageController"
+ * "storage" = "Drupal\migrate\MigrationStorage"
* },
* entity_keys = {
* "id" = "id",
@@ -316,7 +316,7 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem
}
/** @var \Drupal\migrate\Entity\MigrationInterface[] $required_migrations */
- $required_migrations = \Drupal::entityManager()->getStorageController('migration')->loadMultiple($this->requirements);
+ $required_migrations = \Drupal::entityManager()->getStorage('migration')->loadMultiple($this->requirements);
// Check if the dependencies are in good shape.
foreach ($required_migrations as $required_migration) {
// If the dependent source migration has no IDs then no mappings can
diff --git a/core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php b/core/modules/migrate/lib/Drupal/migrate/MigrationStorage.php
index 4b9b0ad..73a5f07 100644
--- a/core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php
+++ b/core/modules/migrate/lib/Drupal/migrate/MigrationStorage.php
@@ -2,24 +2,24 @@
/**
* @file
- * Contains \Drupal\migrate\MigrateStorageController.
+ * Contains \Drupal\migrate\MigrateStorage.
*/
namespace Drupal\migrate;
use Drupal\Component\Graph\Graph;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
/**
* Storage controller for migration entities.
*/
-class MigrationStorageController extends ConfigStorageController implements MigrateBuildDependencyInterface {
+class MigrationStorage extends ConfigEntityStorage implements MigrateBuildDependencyInterface {
/**
* {@inheritdoc}
*/
public function buildDependencyMigration(array $migrations, array $dynamic_ids) {
- // Migration dependencies defined in the migration storage controller can be
+ // Migration dependencies defined in the migration storage can be
// soft dependencies: if a soft dependency does not run, the current
// migration is still OK to go. This is indicated by adding ": false"
// (without quotes) after the name of the dependency. Hard dependencies
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Entity.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Entity.php
index e82f730..17b39ec 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Entity.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Entity.php
@@ -7,7 +7,7 @@
namespace Drupal\migrate\Plugin\migrate\destination;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Row;
@@ -22,11 +22,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class Entity extends DestinationBase implements ContainerFactoryPluginInterface {
/**
- * The entity storage controller.
+ * The entity storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* The list of the bundles of this entity type.
@@ -46,14 +46,14 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
* The plugin implementation definition.
* @param MigrationInterface $migration
* The migration.
- * @param EntityStorageControllerInterface $storage_controller
- * The storage controller for this entity type.
+ * @param EntityStorageInterface $storage
+ * The storage for this entity type.
* @param array $bundles
* The list of bundles this entity type has.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageControllerInterface $storage_controller, array $bundles) {
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
- $this->storageController = $storage_controller;
+ $this->storage = $storage;
$this->bundles = $bundles;
}
@@ -67,7 +67,7 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
$plugin_id,
$plugin_definition,
$migration,
- $container->get('entity.manager')->getStorageController($entity_type_id),
+ $container->get('entity.manager')->getStorage($entity_type_id),
array_keys($container->get('entity.manager')->getBundleInfo($entity_type_id))
);
}
@@ -107,7 +107,7 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
*/
protected function getEntity(Row $row, array $old_destination_id_values) {
$entity_id = $old_destination_id_values ? reset($old_destination_id_values) : $row->getDestinationProperty($this->getKey('id'));
- if (!empty($entity_id) && ($entity = $this->storageController->load($entity_id))) {
+ if (!empty($entity_id) && ($entity = $this->storage->load($entity_id))) {
$this->updateEntity($entity, $row);
}
else {
@@ -119,7 +119,7 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
$values[$bundle_key] = reset($this->bundles);
}
}
- $entity = $this->storageController->create($values);
+ $entity = $this->storage->create($values);
$entity->enforceIsNew();
}
return $entity;
@@ -137,7 +137,7 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
* @see \Drupal\Core\Entity\EntityTypeInterface::getKeys()
*/
protected function getKey($key) {
- return $this->storageController->getEntityType()->getKey($key);
+ return $this->storage->getEntityType()->getKey($key);
}
}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityComment.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityComment.php
index cf3faba..3549d50 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityComment.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityComment.php
@@ -7,7 +7,7 @@
namespace Drupal\migrate\Plugin\migrate\destination;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\field\FieldInfo;
use Drupal\migrate\Entity\MigrationInterface;
@@ -40,8 +40,8 @@ class EntityComment extends EntityContentBase {
* The plugin implementation definition.
* @param MigrationInterface $migration
* The migration.
- * @param EntityStorageControllerInterface $storage_controller
- * The storage controller for this entity type.
+ * @param EntityStorageInterface $storage
+ * The storage for this entity type.
* @param array $bundles
* The list of bundles this entity type has.
* @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager
@@ -51,8 +51,8 @@ class EntityComment extends EntityContentBase {
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* The state storage object.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageControllerInterface $storage_controller, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info, StateInterface $state) {
- parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage_controller, $bundles, $plugin_manager, $field_info);
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info, StateInterface $state) {
+ parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $plugin_manager, $field_info);
$this->state = $state;
}
@@ -66,7 +66,7 @@ class EntityComment extends EntityContentBase {
$plugin_id,
$plugin_definition,
$migration,
- $container->get('entity.manager')->getStorageController($entity_type),
+ $container->get('entity.manager')->getStorage($entity_type),
array_keys($container->get('entity.manager')->getBundleInfo($entity_type)),
$container->get('plugin.manager.migrate.entity_field'),
$container->get('field.info'),
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityContentBase.php
index 70f2624..4feee21 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityContentBase.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityContentBase.php
@@ -9,7 +9,7 @@ namespace Drupal\migrate\Plugin\migrate\destination;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\TypedData\TypedDataInterface;
use Drupal\field\FieldInfo;
use Drupal\migrate\Entity\MigrationInterface;
@@ -38,8 +38,8 @@ class EntityContentBase extends Entity {
* The plugin implementation definition.
* @param \Drupal\migrate\Entity\MigrationInterface $migration
* The migration entity.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
- * The storage controller for this entity type.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The storage for this entity type.
* @param array $bundles
* The list of bundles this entity type has.
* @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager
@@ -47,8 +47,8 @@ class EntityContentBase extends Entity {
* @param \Drupal\Field\FieldInfo $field_info
* The field info.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageControllerInterface $storage_controller, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info) {
- parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage_controller, $bundles);
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info) {
+ parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles);
$this->migrateEntityFieldPluginManager = $plugin_manager;
$this->fieldInfo = $field_info;
}
@@ -63,7 +63,7 @@ class EntityContentBase extends Entity {
$plugin_id,
$plugin_definition,
$migration,
- $container->get('entity.manager')->getStorageController($entity_type),
+ $container->get('entity.manager')->getStorage($entity_type),
array_keys($container->get('entity.manager')->getBundleInfo($entity_type)),
$container->get('plugin.manager.migrate.entity_field'),
$container->get('field.info')
@@ -74,7 +74,7 @@ class EntityContentBase extends Entity {
* {@inheritdoc}
*/
public function import(Row $row, array $old_destination_id_values = array()) {
- if ($all_instances = $this->fieldInfo->getInstances($this->storageController->getEntityTypeId())) {
+ if ($all_instances = $this->fieldInfo->getInstances($this->storage->getEntityTypeId())) {
/** @var \Drupal\Field\Entity\FieldInstanceConfig[] $instances */
$instances = array();
if ($bundle_key = $this->getKey('bundle')) {
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityFile.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityFile.php
index 4c8a1f1..e336f69 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityFile.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityFile.php
@@ -7,7 +7,7 @@
namespace Drupal\migrate\Plugin\migrate\destination;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\field\FieldInfo;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Plugin\MigratePluginManager;
@@ -23,14 +23,14 @@ class EntityFile extends EntityContentBase {
/**
* {@inheritdoc}
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageControllerInterface $storage_controller, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info) {
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info) {
$configuration += array(
'source_base_path' => '',
'source_path_property' => 'filepath',
'destination_path_property' => 'uri',
'move' => FALSE,
);
- parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage_controller, $bundles, $plugin_manager, $field_info);
+ parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $plugin_manager, $field_info);
}
/**
@@ -42,7 +42,7 @@ class EntityFile extends EntityContentBase {
$replace = FILE_EXISTS_REPLACE;
if (!empty($this->configuration['rename'])) {
$entity_id = $row->getDestinationProperty($this->getKey('id'));
- if (!empty($entity_id) && ($entity = $this->storageController->load($entity_id))) {
+ if (!empty($entity_id) && ($entity = $this->storage->load($entity_id))) {
$replace = FILE_EXISTS_RENAME;
}
}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityRevision.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityRevision.php
index 5476def..dfc4b2d 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityRevision.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityRevision.php
@@ -38,12 +38,12 @@ class EntityRevision extends EntityContentBase {
*/
protected function getEntity(Row $row, array $old_destination_id_values) {
$revision_id = $old_destination_id_values ? reset($old_destination_id_values) : $row->getDestinationProperty($this->getKey('revision'));
- if (!empty($revision_id) && ($entity = $this->storageController->loadRevision($revision_id))) {
+ if (!empty($revision_id) && ($entity = $this->storage->loadRevision($revision_id))) {
$entity->setNewRevision(FALSE);
}
else {
$entity_id = $row->getDestinationProperty($this->getKey('id'));
- $entity = $this->storageController->load($entity_id);
+ $entity = $this->storage->load($entity_id);
$entity->enforceIsNew(FALSE);
$entity->setNewRevision(TRUE);
$entity->keepNewRevisionId(TRUE);
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityUser.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityUser.php
index d218b4b..24ff386 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityUser.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/EntityUser.php
@@ -7,7 +7,7 @@
namespace Drupal\migrate\Plugin\migrate\destination;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Password\PasswordInterface;
use Drupal\field\FieldInfo;
use Drupal\migrate\Entity\MigrationInterface;
@@ -42,8 +42,8 @@ class EntityUser extends EntityContentBase {
* The plugin implementation definition.
* @param MigrationInterface $migration
* The migration.
- * @param EntityStorageControllerInterface $storage_controller
- * The storage controller for this entity type.
+ * @param EntityStorageInterface $storage
+ * The storage for this entity type.
* @param array $bundles
* The list of bundles this entity type has.
* @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager
@@ -53,8 +53,8 @@ class EntityUser extends EntityContentBase {
* @param \Drupal\Core\Password\PasswordInterface $password
* The password service.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageControllerInterface $storage_controller, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info, PasswordInterface $password) {
- parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage_controller, $bundles, $plugin_manager, $field_info);
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, MigratePluginManager $plugin_manager, FieldInfo $field_info, PasswordInterface $password) {
+ parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $plugin_manager, $field_info);
if (isset($configuration['md5_passwords'])) {
$this->password = $password;
}
@@ -70,7 +70,7 @@ class EntityUser extends EntityContentBase {
$plugin_id,
$plugin_definition,
$migration,
- $container->get('entity.manager')->getStorageController($entity_type),
+ $container->get('entity.manager')->getStorage($entity_type),
array_keys($container->get('entity.manager')->getBundleInfo($entity_type)),
$container->get('plugin.manager.migrate.entity_field'),
$container->get('field.info'),
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Migration.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Migration.php
index e64e93e..8ba2c45 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Migration.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Migration.php
@@ -8,7 +8,7 @@
namespace Drupal\migrate\Plugin\migrate\process;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\migrate\MigrateException;
use Drupal\migrate\MigrateSkipRowException;
@@ -35,16 +35,16 @@ class Migration extends ProcessPluginBase implements ContainerFactoryPluginInter
protected $processPluginManager;
/**
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
- protected $migrationStorageController;
+ protected $migrationStorage;
/**
* {@inheritdoc}
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageControllerInterface $storage_controller, MigratePluginManager $process_plugin_manager) {
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, MigratePluginManager $process_plugin_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
- $this->migrationStorageController = $storage_controller;
+ $this->migrationStorage = $storage;
$this->migration = $migration;
$this->processPluginManager = $process_plugin_manager;
}
@@ -58,7 +58,7 @@ class Migration extends ProcessPluginBase implements ContainerFactoryPluginInter
$plugin_id,
$plugin_definition,
$migration,
- $container->get('entity.manager')->getStorageController('migration'),
+ $container->get('entity.manager')->getStorage('migration'),
$container->get('plugin.manager.migrate.process')
);
}
@@ -78,7 +78,7 @@ class Migration extends ProcessPluginBase implements ContainerFactoryPluginInter
}
$self = FALSE;
/** @var \Drupal\migrate\Entity\MigrationInterface[] $migrations */
- $migrations = $this->migrationStorageController->loadMultiple($migration_ids);
+ $migrations = $this->migrationStorage->loadMultiple($migration_ids);
$destination_ids = NULL;
$source_id_values = array();
foreach ($migrations as $migration_id => $migration) {
diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorageController.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorage.php
index 08e5d63..5e65cf1 100644
--- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorageController.php
+++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorage.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\migrate_drupal\MigrateStorageController.
+ * Contains \Drupal\migrate_drupal\MigrateStorage.
*/
namespace Drupal\migrate_drupal;
@@ -10,12 +10,12 @@ namespace Drupal\migrate_drupal;
use Drupal\Component\Utility\String;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityStorageException;
-use Drupal\migrate\MigrationStorageController as BaseMigrationStorageController;
+use Drupal\migrate\MigrationStorage as BaseMigrationStorage;
/**
* Storage controller for migration entities.
*/
-class MigrationStorageController extends BaseMigrationStorageController {
+class MigrationStorage extends BaseMigrationStorage {
/**
* {@inheritdoc}
diff --git a/core/modules/migrate_drupal/migrate_drupal.module b/core/modules/migrate_drupal/migrate_drupal.module
index 726222d..7b85d80 100644
--- a/core/modules/migrate_drupal/migrate_drupal.module
+++ b/core/modules/migrate_drupal/migrate_drupal.module
@@ -7,5 +7,5 @@ function migrate_drupal_entity_type_alter(array &$entity_types) {
/** @var \Drupal\Core\Config\Entity\ConfigEntityType[] $entity_types */
$entity_types['migration']
->setClass('Drupal\migrate_drupal\Entity\Migration')
- ->setControllerClass('storage', 'Drupal\migrate_drupal\MigrationStorageController');
+ ->setControllerClass('storage', 'Drupal\migrate_drupal\MigrationStorage');
}
diff --git a/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php b/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php
index 353a8fb..9e60cae 100644
--- a/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php
+++ b/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php
@@ -23,7 +23,7 @@ class NodeRevisionAccessCheck implements AccessInterface {
/**
* The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
@@ -57,7 +57,7 @@ class NodeRevisionAccessCheck implements AccessInterface {
* The database connection.
*/
public function __construct(EntityManagerInterface $entity_manager, Connection $connection) {
- $this->nodeStorage = $entity_manager->getStorageController('node');
+ $this->nodeStorage = $entity_manager->getStorage('node');
$this->nodeAccess = $entity_manager->getAccessController('node');
$this->connection = $connection;
}
diff --git a/core/modules/node/lib/Drupal/node/Controller/NodeController.php b/core/modules/node/lib/Drupal/node/Controller/NodeController.php
index 273f441..f9e4d36 100644
--- a/core/modules/node/lib/Drupal/node/Controller/NodeController.php
+++ b/core/modules/node/lib/Drupal/node/Controller/NodeController.php
@@ -34,7 +34,7 @@ class NodeController extends ControllerBase {
$content = array();
// Only use node types the user has access to.
- foreach ($this->entityManager()->getStorageController('node_type')->loadMultiple() as $type) {
+ foreach ($this->entityManager()->getStorage('node_type')->loadMultiple() as $type) {
if ($this->entityManager()->getAccessController('node')->createAccess($type->type)) {
$content[$type->type] = $type;
}
@@ -65,7 +65,7 @@ class NodeController extends ControllerBase {
$account = $this->currentUser();
$langcode = $this->moduleHandler()->invoke('language', 'get_default_langcode', array('node', $node_type->type));
- $node = $this->entityManager()->getStorageController('node')->create(array(
+ $node = $this->entityManager()->getStorage('node')->create(array(
'uid' => $account->id(),
'name' => $account->getUsername() ?: '',
'type' => $node_type->type,
@@ -87,7 +87,7 @@ class NodeController extends ControllerBase {
* An array suitable for drupal_render().
*/
public function revisionShow($node_revision) {
- $node = $this->entityManager()->getStorageController('node')->loadRevision($node_revision);
+ $node = $this->entityManager()->getStorage('node')->loadRevision($node_revision);
$page = $this->buildPage($node);
unset($page['nodes'][$node->id()]['#cache']);
@@ -104,7 +104,7 @@ class NodeController extends ControllerBase {
* The page title.
*/
public function revisionPageTitle($node_revision) {
- $node = $this->entityManager()->getStorageController('node')->loadRevision($node_revision);
+ $node = $this->entityManager()->getStorage('node')->loadRevision($node_revision);
return $this->t('Revision of %title from %date', array('%title' => $node->label(), '%date' => format_date($node->getRevisionCreationTime())));
}
diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php
index 04eac36..6dada8f 100644
--- a/core/modules/node/lib/Drupal/node/Entity/Node.php
+++ b/core/modules/node/lib/Drupal/node/Entity/Node.php
@@ -8,7 +8,7 @@
namespace Drupal\node\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Language\Language;
@@ -78,8 +78,8 @@ class Node extends ContentEntityBase implements NodeInterface {
/**
* {@inheritdoc}
*/
- public function preSaveRevision(EntityStorageControllerInterface $storage_controller, \stdClass $record) {
- parent::preSaveRevision($storage_controller, $record);
+ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
+ parent::preSaveRevision($storage, $record);
if ($this->newRevision) {
// When inserting either a new node or a new node revision, $node->log
@@ -106,8 +106,8 @@ class Node extends ContentEntityBase implements NodeInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
// Update the node access table for this node, but only if it is the
// default revision. There's no need to delete existing records if the node
@@ -126,8 +126,8 @@ class Node extends ContentEntityBase implements NodeInterface {
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::preDelete($storage_controller, $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
+ parent::preDelete($storage, $entities);
// Assure that all nodes deleted are removed from the search index.
if (\Drupal::moduleHandler()->moduleExists('search')) {
@@ -140,8 +140,8 @@ class Node extends ContentEntityBase implements NodeInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $nodes) {
- parent::postDelete($storage_controller, $nodes);
+ public static function postDelete(EntityStorageInterface $storage, array $nodes) {
+ parent::postDelete($storage, $nodes);
\Drupal::service('node.grant_storage')->deleteNodeRecords(array_keys($nodes));
}
diff --git a/core/modules/node/lib/Drupal/node/Entity/NodeType.php b/core/modules/node/lib/Drupal/node/Entity/NodeType.php
index b187c75..8ca6f72 100644
--- a/core/modules/node/lib/Drupal/node/Entity/NodeType.php
+++ b/core/modules/node/lib/Drupal/node/Entity/NodeType.php
@@ -10,7 +10,7 @@ namespace Drupal\node\Entity;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\node\NodeTypeInterface;
/**
@@ -153,8 +153,8 @@ class NodeType extends ConfigEntityBase implements NodeTypeInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if (!$update) {
// Clear the node type cache, so the new type appears.
@@ -194,11 +194,11 @@ class NodeType extends ConfigEntityBase implements NodeTypeInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
// Clear the node type cache to reflect the removal.
- $storage_controller->resetCache(array_keys($entities));
+ $storage->resetCache(array_keys($entities));
foreach ($entities as $entity) {
entity_invoke_bundle_hook('delete', 'node', $entity->id());
}
@@ -207,8 +207,8 @@ class NodeType extends ConfigEntityBase implements NodeTypeInterface {
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
- parent::preCreate($storage_controller, $values);
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
+ parent::preCreate($storage, $values);
// Ensure default values are set.
if (!isset($values['settings']['node'])) {
diff --git a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php
index 5f474d5..fada9bb 100644
--- a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php
+++ b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php
@@ -35,9 +35,9 @@ class DeleteMultiple extends ConfirmFormBase {
protected $tempStoreFactory;
/**
- * The node storage controller.
+ * The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $manager;
@@ -51,7 +51,7 @@ class DeleteMultiple extends ConfirmFormBase {
*/
public function __construct(TempStoreFactory $temp_store_factory, EntityManagerInterface $manager) {
$this->tempStoreFactory = $temp_store_factory;
- $this->storageController = $manager->getStorageController('node');
+ $this->storage = $manager->getStorage('node');
}
/**
@@ -118,7 +118,7 @@ class DeleteMultiple extends ConfirmFormBase {
*/
public function submitForm(array &$form, array &$form_state) {
if ($form_state['values']['confirm'] && !empty($this->nodes)) {
- $this->storageController->delete($this->nodes);
+ $this->storage->delete($this->nodes);
$this->tempStoreFactory->get('node_multiple_delete_confirm')->delete(\Drupal::currentUser()->id());
$count = count($this->nodes);
watchdog('content', 'Deleted @count posts.', array('@count' => $count));
diff --git a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php
index 93148d4..a543f13 100644
--- a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php
+++ b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php
@@ -88,7 +88,7 @@ class NodeDeleteForm extends ContentEntityConfirmFormBase {
public function submit(array $form, array &$form_state) {
$this->entity->delete();
watchdog('content', '@type: deleted %title.', array('@type' => $this->entity->bundle(), '%title' => $this->entity->label()));
- $node_type_storage = $this->entityManager->getStorageController('node_type');
+ $node_type_storage = $this->entityManager->getStorage('node_type');
$node_type = $node_type_storage->load($this->entity->bundle())->label();
drupal_set_message(t('@type %title has been deleted.', array('@type' => $node_type, '%title' => $this->entity->label())));
Cache::invalidateTags(array('content' => TRUE));
diff --git a/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php b/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php
index 2f78b3c..8890709 100644
--- a/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php
+++ b/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php
@@ -8,7 +8,7 @@
namespace Drupal\node\Form;
use Drupal\Core\Database\Connection;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\ConfirmFormBase;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -28,14 +28,14 @@ class NodeRevisionDeleteForm extends ConfirmFormBase {
/**
* The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
/**
* The node type storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeTypeStorage;
@@ -49,14 +49,14 @@ class NodeRevisionDeleteForm extends ConfirmFormBase {
/**
* Constructs a new NodeRevisionDeleteForm.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_storage
+ * @param \Drupal\Core\Entity\EntityStorageInterface $node_storage
* The node storage.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_type_storage
+ * @param \Drupal\Core\Entity\EntityStorageInterface $node_type_storage
* The node type storage.
* @param \Drupal\Core\Database\Connection $connection
* The database connection.
*/
- public function __construct(EntityStorageControllerInterface $node_storage, EntityStorageControllerInterface $node_type_storage, Connection $connection) {
+ public function __construct(EntityStorageInterface $node_storage, EntityStorageInterface $node_type_storage, Connection $connection) {
$this->nodeStorage = $node_storage;
$this->nodeTypeStorage = $node_type_storage;
$this->connection = $connection;
@@ -68,8 +68,8 @@ class NodeRevisionDeleteForm extends ConfirmFormBase {
public static function create(ContainerInterface $container) {
$entity_manager = $container->get('entity.manager');
return new static(
- $entity_manager->getStorageController('node'),
- $entity_manager->getStorageController('node_type'),
+ $entity_manager->getStorage('node'),
+ $entity_manager->getStorage('node_type'),
$container->get('database')
);
}
diff --git a/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php b/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php
index 86eab4a..b0d717d 100644
--- a/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php
+++ b/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php
@@ -7,7 +7,7 @@
namespace Drupal\node\Form;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\ConfirmFormBase;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -27,17 +27,17 @@ class NodeRevisionRevertForm extends ConfirmFormBase {
/**
* The node storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
/**
* Constructs a new NodeRevisionRevertForm.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_storage
+ * @param \Drupal\Core\Entity\EntityStorageInterface $node_storage
* The node storage.
*/
- public function __construct(EntityStorageControllerInterface $node_storage) {
+ public function __construct(EntityStorageInterface $node_storage) {
$this->nodeStorage = $node_storage;
}
@@ -46,7 +46,7 @@ class NodeRevisionRevertForm extends ConfirmFormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('node')
+ $container->get('entity.manager')->getStorage('node')
);
}
diff --git a/core/modules/node/lib/Drupal/node/NodeAccessController.php b/core/modules/node/lib/Drupal/node/NodeAccessController.php
index 96204a4..7b85600 100644
--- a/core/modules/node/lib/Drupal/node/NodeAccessController.php
+++ b/core/modules/node/lib/Drupal/node/NodeAccessController.php
@@ -27,7 +27,7 @@ class NodeAccessController extends EntityAccessController implements NodeAccessC
/**
* The node grant storage.
*
- * @var \Drupal\node\NodeGrantStorageControllerInterface
+ * @var \Drupal\node\NodeGrantStorageInterface
*/
protected $grantStorage;
diff --git a/core/modules/node/lib/Drupal/node/NodeGrantDatabaseStorageInterface.php b/core/modules/node/lib/Drupal/node/NodeGrantDatabaseStorageInterface.php
index 42ca2ec..c67025b 100644
--- a/core/modules/node/lib/Drupal/node/NodeGrantDatabaseStorageInterface.php
+++ b/core/modules/node/lib/Drupal/node/NodeGrantDatabaseStorageInterface.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\node\NodeGrantStorageControllerInterface.
+ * Contains \Drupal\node\NodeGrantStorageInterface.
*/
namespace Drupal\node;
diff --git a/core/modules/node/lib/Drupal/node/NodeListBuilder.php b/core/modules/node/lib/Drupal/node/NodeListBuilder.php
index d80b6b2..7aa104c 100644
--- a/core/modules/node/lib/Drupal/node/NodeListBuilder.php
+++ b/core/modules/node/lib/Drupal/node/NodeListBuilder.php
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\String;
use Drupal\Core\Datetime\Date;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Language\Language;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -35,12 +35,12 @@ class NodeListBuilder extends EntityListBuilder {
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Core\Datetime\Date $date_service
* The date service.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, Date $date_service) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, Date $date_service) {
parent::__construct($entity_type, $storage);
$this->dateService = $date_service;
@@ -52,7 +52,7 @@ class NodeListBuilder extends EntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('date')
);
}
diff --git a/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php b/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php
index 681fff4..9dfe695 100644
--- a/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php
+++ b/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php
@@ -10,7 +10,7 @@ namespace Drupal\node;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Routing\UrlGeneratorInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Component\Utility\Xss;
@@ -35,12 +35,12 @@ class NodeTypeListBuilder extends ConfigEntityListBuilder {
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
* The url generator service.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, UrlGeneratorInterface $url_generator) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, UrlGeneratorInterface $url_generator) {
parent::__construct($entity_type, $storage);
$this->urlGenerator = $url_generator;
}
@@ -51,7 +51,7 @@ class NodeTypeListBuilder extends ConfigEntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('url_generator')
);
}
diff --git a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php
index 7dc09d6..443c5cb 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php
@@ -231,7 +231,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
->limit(10)
->execute();
- $node_storage = $this->entityManager->getStorageController('node');
+ $node_storage = $this->entityManager->getStorage('node');
$node_render = $this->entityManager->getViewBuilder('node');
foreach ($find as $item) {
@@ -254,7 +254,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
);
$results[] = array(
'link' => $node->url('canonical', array('absolute' => TRUE, 'language' => $language)),
- 'type' => check_plain($this->entityManager->getStorageController('node_type')->load($node->bundle())->label()),
+ 'type' => check_plain($this->entityManager->getStorage('node_type')->load($node->bundle())->label()),
'title' => $node->label(),
'user' => drupal_render($username),
'date' => $node->getChangedTime(),
@@ -306,7 +306,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
// The indexing throttle should be aware of the number of language variants
// of a node.
$counter = 0;
- $node_storage = $this->entityManager->getStorageController('node');
+ $node_storage = $this->entityManager->getStorage('node');
foreach ($node_storage->loadMultiple($nids) as $node) {
// Determine when the maximum number of indexable items is reached.
$counter += count($node->getTranslationLanguages());
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
index cbbafc0..1a15c55 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
@@ -240,7 +240,7 @@ class NodeTranslationUITest extends ContentTranslationUITest {
$default_langcode = $this->langcodes[0];
$values[$default_langcode] = $this->getNewEntityValues($default_langcode);
$this->entityId = $this->createEntity($values[$default_langcode], $default_langcode);
- $node = \Drupal::entityManager()->getStorageController($this->entityTypeId)->load($this->entityId);
+ $node = \Drupal::entityManager()->getStorage($this->entityTypeId)->load($this->entityId);
$node->setPromoted(TRUE);
// Create translations.
@@ -259,7 +259,7 @@ class NodeTranslationUITest extends ContentTranslationUITest {
$this->doTestTranslations('node', $values);
// Enable the translation language renderer.
- $view = \Drupal::entityManager()->getStorageController('view')->load('frontpage');
+ $view = \Drupal::entityManager()->getStorage('view')->load('frontpage');
$display = &$view->getDisplay('default');
$display['display_options']['row']['options']['rendering_language'] = 'translation_language_renderer';
$view->save();
diff --git a/core/modules/node/lib/Drupal/node/Tests/Views/FrontPageTest.php b/core/modules/node/lib/Drupal/node/Tests/Views/FrontPageTest.php
index 7867334..b1f00ef 100644
--- a/core/modules/node/lib/Drupal/node/Tests/Views/FrontPageTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/Views/FrontPageTest.php
@@ -17,11 +17,11 @@ use Drupal\views\Views;
class FrontPageTest extends ViewTestBase {
/**
- * The entity storage controller for nodes.
+ * The entity storage for nodes.
*
- * @var \Drupal\node\NodeStorageController
+ * @var \Drupal\node\NodeStorage
*/
- protected $nodeStorageController;
+ protected $nodeStorage;
/**
* Modules to enable.
@@ -41,7 +41,7 @@ class FrontPageTest extends ViewTestBase {
protected function setUp() {
parent::setUp();
- $this->nodeStorageController = $this->container->get('entity.manager')->getStorageController('node');
+ $this->nodeStorage = $this->container->get('entity.manager')->getStorage('node');
}
/**
@@ -76,14 +76,14 @@ class FrontPageTest extends ViewTestBase {
// Test the sticky order.
if ($i == 5) {
$values['sticky'] = TRUE;
- $node = $this->nodeStorageController->create($values);
+ $node = $this->nodeStorage->create($values);
$node->save();
// Put the sticky on at the front.
array_unshift($expected, array('nid' => $node->id()));
}
else {
$values['sticky'] = FALSE;
- $node = $this->nodeStorageController->create($values);
+ $node = $this->nodeStorage->create($values);
$node->save();
array_push($expected, array('nid' => $node->id()));
}
@@ -98,14 +98,14 @@ class FrontPageTest extends ViewTestBase {
$values['title'] = $this->randomName();
$values['status'] = TRUE;
$values['promote'] = FALSE;
- $node = $this->nodeStorageController->create($values);
+ $node = $this->nodeStorage->create($values);
$node->save();
$not_expected_nids[] = $node->id();
$values['promote'] = TRUE;
$values['status'] = FALSE;
$values['title'] = $this->randomName();
- $node = $this->nodeStorageController->create($values);
+ $node = $this->nodeStorage->create($values);
$node->save();
$not_expected_nids[] = $node->id();
@@ -113,7 +113,7 @@ class FrontPageTest extends ViewTestBase {
$values['sticky'] = TRUE;
$values['status'] = FALSE;
$values['title'] = $this->randomName();
- $node = $this->nodeStorageController->create($values);
+ $node = $this->nodeStorage->create($values);
$node->save();
$not_expected_nids[] = $node->id();
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index 1aa1d41..1616fad 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -489,9 +489,9 @@ function hook_node_create(\Drupal\node\NodeInterface $node) {
* for all available nodes should be loaded in a single query where possible.
*
* This hook is invoked during node loading, which is handled by entity_load(),
- * via classes Drupal\node\NodeStorageController and
- * Drupal\Core\Entity\DatabaseStorageController. After the node information and
- * field values are read from the database or the entity cache,
+ * via classes Drupal\node\NodeStorage and
+ * Drupal\Core\Entity\ContentEntityDatabaseStorage. After the node information
+ * and field values are read from the database or the entity cache,
* hook_entity_load() is invoked on all implementing modules, and finally
* hook_node_load() is invoked on all implementing modules.
*
diff --git a/core/modules/node/tests/Drupal/node/Tests/Plugin/views/field/NodeBulkFormTest.php b/core/modules/node/tests/Drupal/node/Tests/Plugin/views/field/NodeBulkFormTest.php
index 7e1a95e..5deb7c5 100644
--- a/core/modules/node/tests/Drupal/node/Tests/Plugin/views/field/NodeBulkFormTest.php
+++ b/core/modules/node/tests/Drupal/node/Tests/Plugin/views/field/NodeBulkFormTest.php
@@ -55,8 +55,8 @@ class NodeBulkFormTest extends UnitTestCase {
->will($this->returnValue('user'));
$actions[] = $action;
- $storage_controller = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
- $storage_controller->expects($this->any())
+ $entity_storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+ $entity_storage->expects($this->any())
->method('loadMultiple')
->will($this->returnValue($actions));
@@ -89,7 +89,7 @@ class NodeBulkFormTest extends UnitTestCase {
$definition['title'] = '';
$options = array();
- $node_bulk_form = new NodeBulkForm(array(), 'node_bulk_form', $definition, $storage_controller);
+ $node_bulk_form = new NodeBulkForm(array(), 'node_bulk_form', $definition, $entity_storage);
$node_bulk_form->init($executable, $display, $options);
$this->assertAttributeEquals(array_slice($actions, 0, -1, TRUE), 'actions', $node_bulk_form);
diff --git a/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php b/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php
index 4c5284f..985494c 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php
@@ -8,7 +8,7 @@
namespace Drupal\rdf\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\rdf\RdfMappingInterface;
/**
@@ -167,7 +167,7 @@ class RdfMapping extends ConfigEntityBase implements RdfMappingInterface {
if ($bundle_entity_type_id != 'bundle') {
// If the target entity type uses entities to manage its bundles then
// depend on the bundle entity.
- $bundle_entity = \Drupal::entityManager()->getStorageController($bundle_entity_type_id)->load($this->bundle);
+ $bundle_entity = \Drupal::entityManager()->getStorage($bundle_entity_type_id)->load($this->bundle);
$this->addDependency('entity', $bundle_entity->getConfigDependencyName());
}
return $this->dependencies;
@@ -176,8 +176,8 @@ class RdfMapping extends ConfigEntityBase implements RdfMappingInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if (\Drupal::entityManager()->hasController($this->targetEntityType, 'view_builder')) {
\Drupal::entityManager()->getViewBuilder($this->targetEntityType)->resetCache();
diff --git a/core/modules/rdf/tests/Drupal/rdf/Tests/RdfMappingConfigEntityUnitTest.php b/core/modules/rdf/tests/Drupal/rdf/Tests/RdfMappingConfigEntityUnitTest.php
index 1572d9c..abe8c07 100644
--- a/core/modules/rdf/tests/Drupal/rdf/Tests/RdfMappingConfigEntityUnitTest.php
+++ b/core/modules/rdf/tests/Drupal/rdf/Tests/RdfMappingConfigEntityUnitTest.php
@@ -142,14 +142,14 @@ class RdfMappingEntityUnitTest extends UnitTestCase {
->with($this->entityTypeId)
->will($this->returnValue($this->entityType));
- $storage = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
+ $storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
$storage->expects($this->once())
->method('load')
->with($bundle_id)
->will($this->returnValue($bundle_entity));
$this->entityManager->expects($this->once())
- ->method('getStorageController')
+ ->method('getStorage')
->with($bundle_entity_type_id)
->will($this->returnValue($storage));
diff --git a/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php b/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php
index b4fb7fc..82e7ed0 100644
--- a/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php
+++ b/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php
@@ -86,7 +86,7 @@ class ResponsiveImageMapping extends ConfigEntityBase implements ResponsiveImage
// @todo Implement toArray() so we do not have reload the
// entity since this property is changed in
// \Drupal\responsive_image\Entity\ResponsiveImageMapping::save().
- $breakpoint_group = \Drupal::entityManager()->getStorageController('breakpoint_group')->load($this->breakpointGroup);
+ $breakpoint_group = \Drupal::entityManager()->getStorage('breakpoint_group')->load($this->breakpointGroup);
$this->addDependency('entity', $breakpoint_group->getConfigDependencyName());
}
return $this->dependencies;
diff --git a/core/modules/responsive_image/tests/Drupal/responsive_image/Tests/ResponsiveImageMappingEntityTest.php b/core/modules/responsive_image/tests/Drupal/responsive_image/Tests/ResponsiveImageMappingEntityTest.php
index 3ae6538..43ccb05 100644
--- a/core/modules/responsive_image/tests/Drupal/responsive_image/Tests/ResponsiveImageMappingEntityTest.php
+++ b/core/modules/responsive_image/tests/Drupal/responsive_image/Tests/ResponsiveImageMappingEntityTest.php
@@ -62,11 +62,11 @@ class ResponsiveImageMappingEntityTest extends UnitTestCase {
protected $breakpointGroup;
/**
- * The breakpoint group storage controller used for testing.
+ * The breakpoint group storage used for testing.
*
- * @var \Drupal\Core\Config\Entity\ConfigStorageControllerInterface|\PHPUnit_Framework_MockObject_MockObject
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface|\PHPUnit_Framework_MockObject_MockObject
*/
- protected $breakpointGroupStorageController;
+ protected $breakpointGroupStorage;
/**
* {@inheritdoc}
@@ -101,16 +101,16 @@ class ResponsiveImageMappingEntityTest extends UnitTestCase {
$this->breakpointGroupId = $this->randomName(9);
$this->breakpointGroup = $this->getMock('Drupal\breakpoint\Entity\BreakpointGroup', array(), array(array('id' => $this->breakpointGroupId)));
- $this->breakpointGroupStorageController = $this->getMock('\Drupal\Core\Config\Entity\ConfigStorageControllerInterface');
- $this->breakpointGroupStorageController
+ $this->breakpointGroupStorage = $this->getMock('\Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
+ $this->breakpointGroupStorage
->expects($this->any())
->method('load')
->with($this->breakpointGroupId)
->will($this->returnValue($this->breakpointGroup));
$this->entityManager->expects($this->any())
- ->method('getStorageController')
- ->will($this->returnValue($this->breakpointGroupStorageController));
+ ->method('getStorage')
+ ->will($this->returnValue($this->breakpointGroupStorage));
$container = new ContainerBuilder();
$container->set('entity.manager', $this->entityManager);
diff --git a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
index c89e5a1..3e1fb70 100644
--- a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
+++ b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
@@ -10,7 +10,7 @@ namespace Drupal\search\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Component\Plugin\ConfigurablePluginInterface;
use Drupal\search\Plugin\SearchIndexingInterface;
use Drupal\search\Plugin\SearchPluginBag;
@@ -24,7 +24,7 @@ use Drupal\search\SearchPageInterface;
* label = @Translation("Search page"),
* controllers = {
* "access" = "Drupal\search\SearchPageAccessController",
- * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController",
+ * "storage" = "Drupal\Core\Config\Entity\ConfigEntityStorage",
* "list_builder" = "Drupal\search\SearchPageListBuilder",
* "form" = {
* "add" = "Drupal\search\Form\SearchPageAddForm",
@@ -181,8 +181,8 @@ class SearchPage extends ConfigEntityBase implements SearchPageInterface, Entity
/**
* {@inheritdoc}
*/
- public function postCreate(EntityStorageControllerInterface $storage_controller) {
- parent::postCreate($storage_controller);
+ public function postCreate(EntityStorageInterface $storage) {
+ parent::postCreate($storage);
// @todo Use self::applyDefaultValue() once https://drupal.org/node/2004756
// is in.
@@ -194,16 +194,16 @@ class SearchPage extends ConfigEntityBase implements SearchPageInterface, Entity
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
$this->routeBuilder()->setRebuildNeeded();
}
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
$search_page_repository = \Drupal::service('search.search_page_repository');
if (!$search_page_repository->isSearchActive()) {
diff --git a/core/modules/search/lib/Drupal/search/SearchPageListBuilder.php b/core/modules/search/lib/Drupal/search/SearchPageListBuilder.php
index e2c61cd..6d82d20 100644
--- a/core/modules/search/lib/Drupal/search/SearchPageListBuilder.php
+++ b/core/modules/search/lib/Drupal/search/SearchPageListBuilder.php
@@ -10,7 +10,7 @@ namespace Drupal\search;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\Entity\DraggableListBuilder;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Form\FormInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -48,14 +48,14 @@ class SearchPageListBuilder extends DraggableListBuilder implements FormInterfac
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\search\SearchPluginManager $search_manager
* The search plugin manager.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, SearchPluginManager $search_manager, ConfigFactoryInterface $config_factory) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, SearchPluginManager $search_manager, ConfigFactoryInterface $config_factory) {
parent::__construct($entity_type, $storage);
$this->configFactory = $config_factory;
$this->searchManager = $search_manager;
@@ -67,7 +67,7 @@ class SearchPageListBuilder extends DraggableListBuilder implements FormInterfac
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('plugin.manager.search'),
$container->get('config.factory')
);
diff --git a/core/modules/search/lib/Drupal/search/SearchPageRepository.php b/core/modules/search/lib/Drupal/search/SearchPageRepository.php
index db1e57f..55c27dc 100644
--- a/core/modules/search/lib/Drupal/search/SearchPageRepository.php
+++ b/core/modules/search/lib/Drupal/search/SearchPageRepository.php
@@ -25,7 +25,7 @@ class SearchPageRepository implements SearchPageRepositoryInterface {
/**
* The search page storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $storage;
@@ -39,7 +39,7 @@ class SearchPageRepository implements SearchPageRepositoryInterface {
*/
public function __construct(ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager) {
$this->configFactory = $config_factory;
- $this->storage = $entity_manager->getStorageController('search_page');
+ $this->storage = $entity_manager->getStorage('search_page');
}
/**
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
index 0cff49d..97030a6 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
@@ -211,7 +211,7 @@ class SearchConfigSettingsFormTest extends SearchTestBase {
*/
public function testMultipleSearchPages() {
$this->assertDefaultSearch('node_search', 'The default page is set to the installer default.');
- $search_storage = \Drupal::entityManager()->getStorageController('search_page');
+ $search_storage = \Drupal::entityManager()->getStorage('search_page');
$entities = $search_storage->loadMultiple();
$search_storage->delete($entities);
$this->assertDefaultSearch(FALSE);
diff --git a/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php b/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php
index c547251..334f995 100644
--- a/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php
+++ b/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php
@@ -38,7 +38,7 @@ class SearchPageRepositoryTest extends UnitTestCase {
/**
* The search page storage.
*
- * @var \Drupal\Core\Config\Entity\ConfigStorageControllerInterface|\PHPUnit_Framework_MockObject_MockObject
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $storage;
@@ -66,14 +66,14 @@ class SearchPageRepositoryTest extends UnitTestCase {
public function setUp() {
$this->query = $this->getMock('Drupal\Core\Entity\Query\QueryInterface');
- $this->storage = $this->getMock('Drupal\Core\Config\Entity\ConfigStorageControllerInterface');
+ $this->storage = $this->getMock('Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
$this->storage->expects($this->any())
->method('getQuery')
->will($this->returnValue($this->query));
$entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
$entity_manager->expects($this->any())
- ->method('getStorageController')
+ ->method('getStorage')
->will($this->returnValue($this->storage));
$this->configFactory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface');
diff --git a/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php b/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php
index 5ab0c96..b9b308e 100644
--- a/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php
+++ b/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php
@@ -70,7 +70,7 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface {
$data[$bundle_key] = $type;
}
- return $this->entityManager->getStorageController($context['entity_type'])->create($data);
+ return $this->entityManager->getStorage($context['entity_type'])->create($data);
}
}
diff --git a/core/modules/serialization/tests/Drupal/serialization/Tests/Normalizer/EntityNormalizerTest.php b/core/modules/serialization/tests/Drupal/serialization/Tests/Normalizer/EntityNormalizerTest.php
index f162798..968ebfb 100644
--- a/core/modules/serialization/tests/Drupal/serialization/Tests/Normalizer/EntityNormalizerTest.php
+++ b/core/modules/serialization/tests/Drupal/serialization/Tests/Normalizer/EntityNormalizerTest.php
@@ -142,16 +142,16 @@ class EntityNormalizerTest extends UnitTestCase {
'test_type' => 'test_bundle',
);
- $storage_controller = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
- $storage_controller->expects($this->once())
+ $storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+ $storage->expects($this->once())
->method('create')
->with($expected_test_data)
->will($this->returnValue($this->getMock('Drupal\Core\Entity\EntityInterface')));
$this->entityManager->expects($this->once())
- ->method('getStorageController')
+ ->method('getStorage')
->with('test')
- ->will($this->returnValue($storage_controller));
+ ->will($this->returnValue($storage));
$this->assertNotNull($this->entityNormalizer->denormalize($test_data, 'Drupal\Core\Entity\ContentEntityBase', NULL, array('entity_type' => 'test')));
}
@@ -180,16 +180,16 @@ class EntityNormalizerTest extends UnitTestCase {
->with('test')
->will($this->returnValue($entity_type));
- $storage_controller = $this->getMock('Drupal\Core\Entity\EntityStorageControllerInterface');
- $storage_controller->expects($this->once())
+ $storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
+ $storage->expects($this->once())
->method('create')
->with($test_data)
->will($this->returnValue($this->getMock('Drupal\Core\Entity\EntityInterface')));
$this->entityManager->expects($this->once())
- ->method('getStorageController')
+ ->method('getStorage')
->with('test')
- ->will($this->returnValue($storage_controller));
+ ->will($this->returnValue($storage));
$this->assertNotNull($this->entityNormalizer->denormalize($test_data, 'Drupal\Core\Entity\ContentEntityBase', NULL, array('entity_type' => 'test')));
}
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutController.php b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutController.php
index 1ed6f0a..8f3b481 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutController.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutController.php
@@ -27,7 +27,7 @@ class ShortcutController extends ControllerBase {
* The shortcut add form.
*/
public function addForm(ShortcutSetInterface $shortcut_set) {
- $shortcut = $this->entityManager()->getStorageController('shortcut')->create(array('shortcut_set' => $shortcut_set->id()));
+ $shortcut = $this->entityManager()->getStorage('shortcut')->create(array('shortcut_set' => $shortcut_set->id()));
if ($this->moduleHandler()->moduleExists('language')) {
$shortcut->langcode = language_get_default_langcode('shortcut', $shortcut_set->id());
}
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php
index 2d90342..e63e027 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php
@@ -36,7 +36,7 @@ class ShortcutSetController extends ControllerBase {
$link = $request->query->get('link');
$name = $request->query->get('name');
if (shortcut_valid_link($link)) {
- $shortcut = $this->entityManager()->getStorageController('shortcut')->create(array(
+ $shortcut = $this->entityManager()->getStorage('shortcut')->create(array(
'title' => $name,
'shortcut_set' => $shortcut_set->id(),
'path' => $link,
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php b/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php
index 56d4839..eaf7079 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php
@@ -8,7 +8,7 @@
namespace Drupal\shortcut\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Url;
@@ -110,8 +110,8 @@ class Shortcut extends ContentEntityBase implements ShortcutInterface {
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
- parent::preCreate($storage_controller, $values);
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
+ parent::preCreate($storage, $values);
if (!isset($values['shortcut_set'])) {
$values['shortcut_set'] = 'default';
@@ -121,8 +121,8 @@ class Shortcut extends ContentEntityBase implements ShortcutInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
$url = Url::createFromPath($this->path->value);
$this->setRouteName($url->getRouteName());
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php b/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php
index f7f400c..f4d5d59 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php
@@ -8,7 +8,7 @@
namespace Drupal\shortcut\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\shortcut\ShortcutSetInterface;
/**
@@ -18,7 +18,7 @@ use Drupal\shortcut\ShortcutSetInterface;
* id = "shortcut_set",
* label = @Translation("Shortcut set"),
* controllers = {
- * "storage" = "Drupal\shortcut\ShortcutSetStorageController",
+ * "storage" = "Drupal\shortcut\ShortcutSetStorage",
* "access" = "Drupal\shortcut\ShortcutSetAccessController",
* "list_builder" = "Drupal\shortcut\ShortcutSetListBuilder",
* "form" = {
@@ -60,8 +60,8 @@ class ShortcutSet extends ConfigEntityBase implements ShortcutSetInterface {
/**
* {@inheritdoc}
*/
- public function postCreate(EntityStorageControllerInterface $storage_controller) {
- parent::postCreate($storage_controller);
+ public function postCreate(EntityStorageInterface $storage) {
+ parent::postCreate($storage);
// Generate menu-compatible set name.
if (!$this->getOriginalId()) {
@@ -79,18 +79,18 @@ class ShortcutSet extends ConfigEntityBase implements ShortcutSetInterface {
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::preDelete($storage_controller, $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
+ parent::preDelete($storage, $entities);
foreach ($entities as $entity) {
- $storage_controller->deleteAssignedShortcutSets($entity);
+ $storage->deleteAssignedShortcutSets($entity);
// Next, delete the shortcuts for this set.
$shortcut_ids = \Drupal::entityQuery('shortcut')
->condition('shortcut_set', $entity->id(), '=')
->execute();
- $controller = \Drupal::entityManager()->getStorageController('shortcut');
+ $controller = \Drupal::entityManager()->getStorage('shortcut');
$entities = $controller->loadMultiple($shortcut_ids);
$controller->delete($entities);
}
@@ -113,7 +113,7 @@ class ShortcutSet extends ConfigEntityBase implements ShortcutSetInterface {
* {@inheritdoc}
*/
public function getShortcuts() {
- return \Drupal::entityManager()->getStorageController('shortcut')->loadByProperties(array('shortcut_set' => $this->id()));
+ return \Drupal::entityManager()->getStorage('shortcut')->loadByProperties(array('shortcut_set' => $this->id()));
}
}
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php b/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php
index 0b97ded..504b81e 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php
@@ -8,7 +8,7 @@
namespace Drupal\shortcut\Form;
use Drupal\Core\Entity\EntityConfirmFormBase;
-use Drupal\shortcut\ShortcutSetStorageControllerInterface;
+use Drupal\shortcut\ShortcutSetStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Database\Connection;
@@ -25,18 +25,18 @@ class ShortcutSetDeleteForm extends EntityConfirmFormBase {
protected $database;
/**
- * The shortcut storage controller.
+ * The shortcut storage.
*
- * @var \Drupal\shortcut\ShortcutSetStorageControllerInterface
+ * @var \Drupal\shortcut\ShortcutSetStorageInterface
*/
- protected $storageController;
+ protected $storage;
/**
* Constructs a ShortcutSetDeleteForm object.
*/
- public function __construct(Connection $database, ShortcutSetStorageControllerInterface $storage_controller) {
+ public function __construct(Connection $database, ShortcutSetStorageInterface $storage) {
$this->database = $database;
- $this->storageController = $storage_controller;
+ $this->storage = $storage;
}
/**
@@ -45,7 +45,7 @@ class ShortcutSetDeleteForm extends EntityConfirmFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('database'),
- $container->get('entity.manager')->getStorageController('shortcut_set')
+ $container->get('entity.manager')->getStorage('shortcut_set')
);
}
@@ -81,7 +81,7 @@ class ShortcutSetDeleteForm extends EntityConfirmFormBase {
public function buildForm(array $form, array &$form_state) {
// Find out how many users are directly assigned to this shortcut set, and
// make a message.
- $number = $this->storageController->countAssignedUsers($this->entity);
+ $number = $this->storage->countAssignedUsers($this->entity);
$info = '';
if ($number) {
$info .= '<p>' . format_plural($number,
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutAccessController.php b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutAccessController.php
index 45d3731..402aca7 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutAccessController.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutAccessController.php
@@ -20,9 +20,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class ShortcutAccessController extends EntityAccessController implements EntityControllerInterface {
/**
- * The shortcut_set storage controller.
+ * The shortcut_set storage.
*
- * @var \Drupal\shortcut\ShortcutSetStorageController
+ * @var \Drupal\shortcut\ShortcutSetStorage
*/
protected $shortcutSetStorage;
@@ -31,10 +31,10 @@ class ShortcutAccessController extends EntityAccessController implements EntityC
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\shortcut\ShortcutSetStorageController $shortcut_set_storage
- * The shortcut_set storage controller.
+ * @param \Drupal\shortcut\ShortcutSetStorage $shortcut_set_storage
+ * The shortcut_set storage.
*/
- public function __construct(EntityTypeInterface $entity_type, ShortcutSetStorageController $shortcut_set_storage) {
+ public function __construct(EntityTypeInterface $entity_type, ShortcutSetStorage $shortcut_set_storage) {
parent::__construct($entity_type);
$this->shortcutSetStorage = $shortcut_set_storage;
}
@@ -45,7 +45,7 @@ class ShortcutAccessController extends EntityAccessController implements EntityC
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController('shortcut_set')
+ $container->get('entity.manager')->getStorage('shortcut_set')
);
}
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageController.php b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorage.php
index 5d82768..ea723d6 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageController.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorage.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\shortcut\ShortcutSetStorageController.
+ * Contains \Drupal\shortcut\ShortcutSetStorage.
*/
namespace Drupal\shortcut;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
/**
- * Defines a storage controller for shortcut_set entities.
+ * Defines a storage for shortcut_set entities.
*/
-class ShortcutSetStorageController extends ConfigStorageController implements ShortcutSetStorageControllerInterface {
+class ShortcutSetStorage extends ConfigEntityStorage implements ShortcutSetStorageInterface {
/**
* {@inheritdoc}
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageControllerInterface.php b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageInterface.php
index 2fb8261..11af402 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageControllerInterface.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetStorageInterface.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\shortcut\ShortcutSetStorageControllerInterface.
+ * Contains \Drupal\shortcut\ShortcutSetStorageInterface.
*/
namespace Drupal\shortcut;
-use Drupal\Core\Config\Entity\ConfigStorageControllerInterface;
+use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
/**
* Defines a common interface for shortcut entity controller classes.
*/
-interface ShortcutSetStorageControllerInterface extends ConfigStorageControllerInterface {
+interface ShortcutSetStorageInterface extends ConfigEntityStorageInterface {
/**
* Assigns a user to a particular shortcut set.
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutSetsTest.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutSetsTest.php
index 9d39537..2a31535 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutSetsTest.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutSetsTest.php
@@ -31,7 +31,7 @@ class ShortcutSetsTest extends ShortcutTestBase {
'id' => strtolower($this->randomName()),
);
$this->drupalPostForm(NULL, $edit, t('Save'));
- $new_set = $this->container->get('entity.manager')->getStorageController('shortcut_set')->load($edit['id']);
+ $new_set = $this->container->get('entity.manager')->getStorage('shortcut_set')->load($edit['id']);
$this->assertIdentical($new_set->id(), $edit['id'], 'Successfully created a shortcut set.');
$this->drupalGet('user/' . $this->admin_user->id() . '/shortcuts');
$this->assertText($new_set->label(), 'Generated shortcut set was listed as a choice on the user account page.');
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php
index 9dc04dc..de9e110 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php
@@ -111,7 +111,7 @@ abstract class ShortcutTestBase extends WebTestBase {
*/
function getShortcutInformation(ShortcutSetInterface $set, $key) {
$info = array();
- \Drupal::entityManager()->getStorageController('shortcut')->resetCache();
+ \Drupal::entityManager()->getStorage('shortcut')->resetCache();
foreach ($set->getShortcuts() as $shortcut) {
$info[] = $shortcut->{$key}->value;
}
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index c3d4197..3f8a261 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -159,7 +159,7 @@ function shortcut_set_load($id) {
*/
function shortcut_set_assign_user($shortcut_set, $account) {
\Drupal::entityManager()
- ->getStorageController('shortcut_set')
+ ->getStorage('shortcut_set')
->assignUser($shortcut_set, $account);
}
@@ -178,7 +178,7 @@ function shortcut_set_assign_user($shortcut_set, $account) {
*/
function shortcut_set_unassign_user($account) {
return (bool) \Drupal::entityManager()
- ->getStorageController('shortcut_set')
+ ->getStorage('shortcut_set')
->unassignUser($account);
}
@@ -207,7 +207,7 @@ function shortcut_current_displayed_set($account = NULL) {
// If none was found, try to find a shortcut set that is explicitly assigned
// to this user.
$shortcut_set_name = \Drupal::entityManager()
- ->getStorageController('shortcut_set')
+ ->getStorage('shortcut_set')
->getAssignedToUser($account);
if ($shortcut_set_name) {
$shortcut_set = shortcut_set_load($shortcut_set_name);
@@ -312,7 +312,7 @@ function shortcut_renderable_links($shortcut_set = NULL) {
$shortcut_set = shortcut_current_displayed_set();
}
- $shortcuts = \Drupal::entityManager()->getStorageController('shortcut')->loadByProperties(array('shortcut_set' => $shortcut_set->id()));
+ $shortcuts = \Drupal::entityManager()->getStorage('shortcut')->loadByProperties(array('shortcut_set' => $shortcut_set->id()));
foreach ($shortcuts as $shortcut) {
$links[] = array(
'title' => $shortcut->label(),
@@ -375,7 +375,7 @@ function shortcut_preprocess_page(&$variables) {
$shortcut_set = shortcut_current_displayed_set();
// Check if $link is already a shortcut and set $link_mode accordingly.
- $shortcuts = \Drupal::entityManager()->getStorageController('shortcut')->loadByProperties(array('shortcut_set' => $shortcut_set->id()));
+ $shortcuts = \Drupal::entityManager()->getStorage('shortcut')->loadByProperties(array('shortcut_set' => $shortcut_set->id()));
foreach ($shortcuts as $shortcut) {
if ($shortcut->getRouteName() == $url->getRouteName() && $shortcut->getRouteParams() == $url->getRouteParameters()) {
$shortcut_id = $shortcut->id();
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 3f86126..89a3394 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -208,7 +208,7 @@ abstract class WebTestBase extends TestBase {
*/
function drupalGetNodeByTitle($title, $reset = FALSE) {
if ($reset) {
- \Drupal::entityManager()->getStorageController('node')->resetCache();
+ \Drupal::entityManager()->getStorage('node')->resetCache();
}
$nodes = entity_load_multiple_by_properties('node', array('title' => $title));
// Load the first node returned from the database.
diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php
index 0acf2c3..c960371 100644
--- a/core/modules/system/entity.api.php
+++ b/core/modules/system/entity.api.php
@@ -134,8 +134,8 @@ function hook_entity_type_build(array &$entity_types) {
function hook_entity_type_alter(array &$entity_types) {
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
// Set the controller class for nodes to an alternate implementation of the
- // Drupal\Core\Entity\EntityStorageControllerInterface interface.
- $entity_types['node']->setStorageClass('Drupal\mymodule\MyCustomNodeStorageController');
+ // Drupal\Core\Entity\EntityStorageInterface interface.
+ $entity_types['node']->setStorageClass('Drupal\mymodule\MyCustomNodeStorage');
}
/**
diff --git a/core/modules/system/lib/Drupal/system/Controller/SystemController.php b/core/modules/system/lib/Drupal/system/Controller/SystemController.php
index 361f716..421791f 100644
--- a/core/modules/system/lib/Drupal/system/Controller/SystemController.php
+++ b/core/modules/system/lib/Drupal/system/Controller/SystemController.php
@@ -108,7 +108,7 @@ class SystemController extends ControllerBase {
->condition('link_path', 'admin/config')
->condition('module', 'system');
$result = $query->execute();
- $menu_link_storage = $this->entityManager()->getStorageController('menu_link');
+ $menu_link_storage = $this->entityManager()->getStorage('menu_link');
if ($system_link = $menu_link_storage->loadMultiple($result)) {
$system_link = reset($system_link);
$query = $this->queryFactory->get('menu_link')
diff --git a/core/modules/system/lib/Drupal/system/DateFormatListBuilder.php b/core/modules/system/lib/Drupal/system/DateFormatListBuilder.php
index be83cd9..076a27c 100644
--- a/core/modules/system/lib/Drupal/system/DateFormatListBuilder.php
+++ b/core/modules/system/lib/Drupal/system/DateFormatListBuilder.php
@@ -11,7 +11,7 @@ use Drupal\Component\Utility\String;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Datetime\Date;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -34,12 +34,12 @@ class DateFormatListBuilder extends ConfigEntityListBuilder {
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The entity storage controller class.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The entity storage class.
* @param \Drupal\Core\Datetime\Date $date_service
* The date service.
*/
- public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, Date $date_service) {
+ public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, Date $date_service) {
parent::__construct($entity_type, $storage);
$this->dateService = $date_service;
@@ -51,7 +51,7 @@ class DateFormatListBuilder extends ConfigEntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
- $container->get('entity.manager')->getStorageController($entity_type->id()),
+ $container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('date')
);
}
diff --git a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php
index 21d8035..fabab0e 100644
--- a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php
+++ b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php
@@ -9,7 +9,7 @@ namespace Drupal\system\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Datetime\DrupalDateTime;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\system\DateFormatInterface;
/**
diff --git a/core/modules/system/lib/Drupal/system/Entity/Menu.php b/core/modules/system/lib/Drupal/system/Entity/Menu.php
index 8dadc1c..4b6cee5 100644
--- a/core/modules/system/lib/Drupal/system/Entity/Menu.php
+++ b/core/modules/system/lib/Drupal/system/Entity/Menu.php
@@ -9,7 +9,7 @@ namespace Drupal\system\Entity;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\system\MenuInterface;
/**
@@ -84,8 +84,8 @@ class Menu extends ConfigEntityBase implements MenuInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
Cache::invalidateTags(array('menu' => $this->id()));
}
@@ -93,8 +93,8 @@ class Menu extends ConfigEntityBase implements MenuInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
Cache::invalidateTags(array('menu' => array_keys($entities)));
}
diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
index ac94508..8e987bc 100644
--- a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
+++ b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
@@ -9,7 +9,7 @@ namespace Drupal\system\Form;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\ReplaceCommand;
-use Drupal\Core\Config\Entity\ConfigStorageControllerInterface;
+use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
use Drupal\Core\Datetime\Date;
use Drupal\Core\Language\Language;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -36,9 +36,9 @@ abstract class DateFormatFormBase extends EntityFormController {
protected $dateService;
/**
- * The date format storage controller.
+ * The date format storage.
*
- * @var \Drupal\Core\Config\Entity\ConfigStorageControllerInterface
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
*/
protected $dateFormatStorage;
@@ -47,10 +47,10 @@ abstract class DateFormatFormBase extends EntityFormController {
*
* @param \Drupal\Core\Datetime\Date $date_service
* The date service.
- * @param \Drupal\Core\Config\Entity\ConfigStorageControllerInterface $date_format_storage
- * The date format storage controller.
+ * @param \Drupal\Core\Config\Entity\ConfigEntityStorageInterface $date_format_storage
+ * The date format storage.
*/
- public function __construct(Date $date_service, ConfigStorageControllerInterface $date_format_storage) {
+ public function __construct(Date $date_service, ConfigEntityStorageInterface $date_format_storage) {
$date = new DrupalDateTime();
$this->patternType = $date->canUseIntl() ? DrupalDateTime::INTL : DrupalDateTime::PHP;
@@ -64,7 +64,7 @@ abstract class DateFormatFormBase extends EntityFormController {
public static function create(ContainerInterface $container) {
return new static(
$container->get('date'),
- $container->get('entity.manager')->getStorageController('date_format')
+ $container->get('entity.manager')->getStorage('date_format')
);
}
diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php
index b3f9e94..2148451 100644
--- a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php
+++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php
@@ -229,7 +229,7 @@ class ModulesListForm extends FormBase {
$result = $this->queryFactory->get('menu_link')
->condition('route_name', $module->info['configure'])
->execute();
- $menu_items = $this->entityManager->getStorageController('menu_link')->loadMultiple($result);
+ $menu_items = $this->entityManager->getStorage('menu_link')->loadMultiple($result);
$item = reset($menu_items);
$row['links']['configure'] = array(
'#type' => 'link',
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php
index 72a4c49..c09eb10 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -22,17 +22,17 @@ class SystemMenuBlock extends DerivativeBase implements ContainerDerivativeInter
/**
* The menu storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $menuStorage;
/**
* Constructs new SystemMenuBlock.
*
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $menu_storage
+ * @param \Drupal\Core\Entity\EntityStorageInterface $menu_storage
* The menu storage.
*/
- public function __construct(EntityStorageControllerInterface $menu_storage) {
+ public function __construct(EntityStorageInterface $menu_storage) {
$this->menuStorage = $menu_storage;
}
@@ -41,7 +41,7 @@ class SystemMenuBlock extends DerivativeBase implements ContainerDerivativeInter
*/
public static function create(ContainerInterface $container, $base_plugin_id) {
return new static(
- $container->get('entity.manager')->getStorageController('menu')
+ $container->get('entity.manager')->getStorage('menu')
);
}
diff --git a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkForm.php b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkForm.php
index 9537cee..96df7c7 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkForm.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkForm.php
@@ -7,7 +7,7 @@
namespace Drupal\system\Plugin\views\field;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\Plugin\views\style\Table;
@@ -23,9 +23,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class BulkForm extends FieldPluginBase {
/**
- * The action storage controller.
+ * The action storage.
*
- * @var \Drupal\Core\Entity\EntityStorageControllerInterface
+ * @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $actionStorage;
@@ -45,10 +45,10 @@ class BulkForm extends FieldPluginBase {
* The plugin ID for the plugin instance.
* @param array $plugin_definition
* The plugin implementation definition.
- * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage
- * The action storage controller.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $storage
+ * The action storage.
*/
- public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityStorageControllerInterface $storage) {
+ public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityStorageInterface $storage) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->actionStorage = $storage;
@@ -58,7 +58,7 @@ class BulkForm extends FieldPluginBase {
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
- return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity.manager')->getStorageController('action'));
+ return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity.manager')->getStorage('action'));
}
/**
diff --git a/core/modules/system/lib/Drupal/system/SystemManager.php b/core/modules/system/lib/Drupal/system/SystemManager.php
index eb14718..506e78c 100644
--- a/core/modules/system/lib/Drupal/system/SystemManager.php
+++ b/core/modules/system/lib/Drupal/system/SystemManager.php
@@ -36,7 +36,7 @@ class SystemManager {
/**
* The menu link storage.
*
- * @var \Drupal\menu_link\MenuLinkStorageControllerInterface
+ * @var \Drupal\menu_link\MenuLinkStorageInterface
*/
protected $menuLinkStorage;
@@ -82,7 +82,7 @@ class SystemManager {
public function __construct(ModuleHandlerInterface $module_handler, Connection $database, EntityManagerInterface $entity_manager) {
$this->moduleHandler = $module_handler;
$this->database = $database;
- $this->menuLinkStorage = $entity_manager->getStorageController('menu_link');
+ $this->menuLinkStorage = $entity_manager->getStorage('menu_link');
}
/**
diff --git a/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php
index 96f2d73..6f97da1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php
@@ -70,7 +70,7 @@ class ActionUnitTest extends DrupalUnitTestBase {
// Create a new unsaved user.
$name = $this->randomName();
- $user_storage = $this->container->get('entity.manager')->getStorageController('user');
+ $user_storage = $this->container->get('entity.manager')->getStorage('user');
$account = $user_storage->create(array('name' => $name, 'bundle' => 'user'));
$loaded_accounts = $user_storage->loadMultiple();
$this->assertEqual(count($loaded_accounts), 0);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
index c9ac3bd..1a6b758 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
@@ -42,7 +42,7 @@ class FormatDateTest extends WebTestBase {
->set('timezone.user.configurable', 1)
->save();
$formats = $this->container->get('entity.manager')
- ->getStorageController('date_format')
+ ->getStorage('date_format')
->loadMultiple(array('long', 'medium', 'short'));
$formats['long']->setPattern('l, j. F Y - G:i')->save();
$formats['medium']->setPattern('j. F Y - G:i')->save();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Datetime/DateTimePlusIntlTest.php b/core/modules/system/lib/Drupal/system/Tests/Datetime/DateTimePlusIntlTest.php
index b38f955..eb21948 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Datetime/DateTimePlusIntlTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Datetime/DateTimePlusIntlTest.php
@@ -77,7 +77,7 @@ class DateTimePlusIntlTest extends DrupalUnitTestBase {
$this->assertFalse($php_date->canUseIntl(), 'DateTimePlus object will fallback to use PHP when not provided with country setting.');
$default_formats = $this->container->get('entity.manager')
- ->getStorageController('date_format')
+ ->getStorage('date_format')
->loadMultiple();
foreach ($default_formats as $format) {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/BundleConstraintValidatorTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/BundleConstraintValidatorTest.php
index b26b0fc..79906f0 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/BundleConstraintValidatorTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/BundleConstraintValidatorTest.php
@@ -60,14 +60,14 @@ class BundleConstraintValidatorTest extends DrupalUnitTestBase {
->addConstraint('Bundle', $bundle);
// Test the validation.
- $node = $this->container->get('entity.manager')->getStorageController('node')->create(array('type' => 'foo'));
+ $node = $this->container->get('entity.manager')->getStorage('node')->create(array('type' => 'foo'));
$typed_data = $this->typedData->create($definition, $node);
$violations = $typed_data->validate();
$this->assertEqual($violations->count(), 0, 'Validation passed for correct value.');
// Test the validation when an invalid value is passed.
- $page_node = $this->container->get('entity.manager')->getStorageController('node')->create(array('type' => 'baz'));
+ $page_node = $this->container->get('entity.manager')->getStorage('node')->create(array('type' => 'baz'));
$typed_data = $this->typedData->create($definition, $page_node);
$violations = $typed_data->validate();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php
index 93fd554..712b628 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php
@@ -54,6 +54,6 @@ class EntityApiInfoTest extends WebTestBase {
\Drupal::moduleHandler()->install(array('entity_cache_test'));
$entity_type = \Drupal::state()->get('entity_cache_test');
$this->assertEqual($entity_type->getLabel(), 'Entity Cache Test', 'Entity info label is correct.');
- $this->assertEqual($entity_type->getStorageClass(), 'Drupal\Core\Entity\DatabaseStorageController', 'Entity controller class info is correct.');
+ $this->assertEqual($entity_type->getStorageClass(), 'Drupal\Core\Entity\EntityDatabaseStorage', 'Entity controller class info is correct.');
}
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php
index bac3868..e1f66b5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php
@@ -82,11 +82,11 @@ abstract class EntityCacheTagsTestBase extends PageCacheTagsTestBase {
))->save();
// Reload the entity now that a new field has been added to it.
- $storage_controller = $this->container
+ $storage = $this->container
->get('entity.manager')
- ->getStorageController($this->entity->getEntityTypeId());
- $storage_controller->resetCache();
- $this->entity = $storage_controller->load($this->entity->id());
+ ->getStorage($this->entity->getEntityTypeId());
+ $storage->resetCache();
+ $this->entity = $storage->load($this->entity->id());
}
// Create a referencing and a non-referencing entity.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php
index 3fa3533..66940a7 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php
@@ -90,12 +90,12 @@ class EntityFormTest extends WebTestBase {
}
/**
- * Loads a test entity by name always resetting the storage controller cache.
+ * Loads a test entity by name always resetting the storage cache.
*/
protected function loadEntityByName($entity_type, $name) {
// Always load the entity from the database to ensure that changes are
// correctly picked up.
- $this->container->get('entity.manager')->getStorageController($entity_type)->resetCache();
+ $this->container->get('entity.manager')->getStorage($entity_type)->resetCache();
return current(entity_load_multiple_by_properties($entity_type, array('name' => $name)));
}
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregateTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregateTest.php
index 5adfdde..6ea5549 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregateTest.php
@@ -21,11 +21,11 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
public static $modules = array();
/**
- * The entity_test storage controller to create the test entities.
+ * The entity_test storage to create the test entities.
*
- * @var \Drupal\entity_test\EntityTestStorageController
+ * @var \Drupal\entity_test\EntityTestStorage
*/
- protected $entityStorageController;
+ protected $entityStorage;
/**
* The actual query result, to compare later.
@@ -52,7 +52,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
public function setUp() {
parent::setUp();
- $this->entityStorageController = $this->container->get('entity.manager')->getStorageController('entity_test');
+ $this->entityStorage = $this->container->get('entity.manager')->getStorage('entity_test');
$this->factory = $this->container->get('entity.query');
// Add some fieldapi fields to be used in the test.
@@ -71,7 +71,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
))->save();
}
- $entity = $this->entityStorageController->create(array(
+ $entity = $this->entityStorage->create(array(
'id' => 1,
'user_id' => 1,
'field_test_1' => 1,
@@ -80,7 +80,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
$entity->enforceIsNew();
$entity->save();
- $entity = $this->entityStorageController->create(array(
+ $entity = $this->entityStorage->create(array(
'id' => 2,
'user_id' => 2,
'field_test_1' => 1,
@@ -88,7 +88,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
));
$entity->enforceIsNew();
$entity->save();
- $entity = $this->entityStorageController->create(array(
+ $entity = $this->entityStorage->create(array(
'id' => 3,
'user_id' => 2,
'field_test_1' => 2,
@@ -96,7 +96,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
));
$entity->enforceIsNew();
$entity->save();
- $entity = $this->entityStorageController->create(array(
+ $entity = $this->entityStorage->create(array(
'id' => 4,
'user_id' => 2,
'field_test_1' => 2,
@@ -104,7 +104,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
));
$entity->enforceIsNew();
$entity->save();
- $entity = $this->entityStorageController->create(array(
+ $entity = $this->entityStorage->create(array(
'id' => 5,
'user_id' => 3,
'field_test_1' => 2,
@@ -112,7 +112,7 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
));
$entity->enforceIsNew();
$entity->save();
- $entity = $this->entityStorageController->create(array(
+ $entity = $this->entityStorage->create(array(
'id' => 6,
'user_id' => 3,
'field_test_1' => 3,
@@ -586,4 +586,3 @@ class EntityQueryAggregateTest extends EntityUnitTestBase {
return $this->assertResults($expected, TRUE);
}
}
-
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php
index c01a2e2..70f180e 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php
@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Entity;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Language\Language;
use Symfony\Component\HttpFoundation\Request;
@@ -249,7 +249,7 @@ class EntityQueryTest extends EntityUnitTestBase {
$this->assertResult();
$this->queryResults = $this->factory->get('entity_test_mulrev')
->condition("$greetings.value", 'merhaba')
- ->age(EntityStorageControllerInterface::FIELD_LOAD_REVISION)
+ ->age(EntityStorageInterface::FIELD_LOAD_REVISION)
->sort('revision_id')
->execute();
// Bit 2 needs to be set.
@@ -279,7 +279,7 @@ class EntityQueryTest extends EntityUnitTestBase {
$this->assertIdentical($results, array_slice($assert, 4, 8, TRUE));
$results = $this->factory->get('entity_test_mulrev')
->condition("$greetings.value", 'a', 'ENDS_WITH')
- ->age(EntityStorageControllerInterface::FIELD_LOAD_REVISION)
+ ->age(EntityStorageInterface::FIELD_LOAD_REVISION)
->sort('id')
->execute();
// Now we get everything.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
index 7dcbd6b..7b72ee5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
@@ -295,7 +295,7 @@ class EntityTranslationTest extends EntityLanguageTestBase {
$default_langcode = $this->langcodes[0];
$langcode = $this->langcodes[1];
$entity = $this->entityManager
- ->getStorageController('entity_test_mul')
+ ->getStorage('entity_test_mul')
->create(array('name' => $this->randomName()));
$entity->save();
@@ -435,7 +435,7 @@ class EntityTranslationTest extends EntityLanguageTestBase {
// Check that per-language defaults are properly populated.
$entity = $this->reloadEntity($entity);
$instance_id = implode('.', array($entity->getEntityTypeId(), $entity->bundle(), $this->field_name));
- $instance = $this->entityManager->getStorageController('field_instance_config')->load($instance_id);
+ $instance = $this->entityManager->getStorage('field_instance_config')->load($instance_id);
$instance->default_value_function = 'entity_test_field_default_value';
$instance->save();
$translation = $entity->addTranslation($langcode2);
@@ -462,7 +462,7 @@ class EntityTranslationTest extends EntityLanguageTestBase {
$langcode2 = $this->langcodes[2];
$entity_type = 'entity_test_mul';
- $controller = $this->entityManager->getStorageController($entity_type);
+ $controller = $this->entityManager->getStorage($entity_type);
$entity = $controller->create(array('langcode' => $default_langcode) + $values[$default_langcode]);
$entity->save();
@@ -550,7 +550,7 @@ class EntityTranslationTest extends EntityLanguageTestBase {
*/
public function testLanguageChange() {
$entity_type = 'entity_test_mul';
- $controller = $this->entityManager->getStorageController($entity_type);
+ $controller = $this->entityManager->getStorage($entity_type);
$langcode = $this->langcodes[0];
// check that field languages match entity language regardless of field
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypeConstraintValidatorTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypeConstraintValidatorTest.php
index 6428ef0..93b60cf 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypeConstraintValidatorTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypeConstraintValidatorTest.php
@@ -51,7 +51,7 @@ class EntityTypeConstraintValidatorTest extends EntityUnitTestBase {
);
// Test the validation.
- $node = $this->container->get('entity.manager')->getStorageController('node')->create(array('type' => 'page'));
+ $node = $this->container->get('entity.manager')->getStorage('node')->create(array('type' => 'page'));
$typed_data = $this->typedData->create($definition, $node);
$violations = $typed_data->validate();
$this->assertEqual($violations->count(), 0, 'Validation passed for correct value.');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUnitTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUnitTestBase.php
index 8537fbb..99fe76a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUnitTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUnitTestBase.php
@@ -91,7 +91,7 @@ abstract class EntityUnitTestBase extends DrupalUnitTestBase {
* The reloaded entity.
*/
protected function reloadEntity(EntityInterface $entity) {
- $controller = $this->entityManager->getStorageController($entity->getEntityTypeId());
+ $controller = $this->entityManager->getStorage($entity->getEntityTypeId());
$controller->resetCache(array($entity->id()));
return $controller->load($entity->id());
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewBuilderTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewBuilderTest.php
index 0379aa7..6ac4a62 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewBuilderTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewBuilderTest.php
@@ -171,7 +171,7 @@ class EntityViewBuilderTest extends EntityUnitTestBase {
'bundle' => $entity_type,
'name' => $this->randomName(),
);
- return $this->container->get('entity.manager')->getStorageController($entity_type)->create($data);
+ return $this->container->get('entity.manager')->getStorage($entity_type)->create($data);
}
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php
index 40613d7..e6d4971 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php
@@ -43,7 +43,7 @@ class EntityViewControllerTest extends WebTestBase {
for ($i = 0; $i < 2; $i++) {
$random_label = $this->randomName();
$data = array('bundle' => 'entity_test', 'name' => $random_label);
- $entity_test = $this->container->get('entity.manager')->getStorageController('entity_test')->create($data);
+ $entity_test = $this->container->get('entity.manager')->getStorage('entity_test')->create($data);
$entity_test->save();
$this->entities[] = $entity_test;
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php
index 8894088..82e63b2 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Entity;
use Drupal\Core\Database\Database;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\field\FieldException;
use Drupal\field\Entity\FieldConfig;
use Drupal\system\Tests\Entity\EntityUnitTestBase;
@@ -85,8 +85,8 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
));
$this->instance->save();
- $this->table = FieldableDatabaseStorageController::_fieldTableName($this->field);
- $this->revision_table = FieldableDatabaseStorageController::_fieldRevisionTableName($this->field);
+ $this->table = ContentEntityDatabaseStorage::_fieldTableName($this->field);
+ $this->revision_table = ContentEntityDatabaseStorage::_fieldRevisionTableName($this->field);
}
/**
@@ -94,9 +94,9 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
*/
function testFieldLoad() {
$entity_type = $bundle = 'entity_test_rev';
- $storage_controller = $this->container->get('entity.manager')->getStorageController($entity_type);
+ $storage = $this->container->get('entity.manager')->getStorage($entity_type);
- $columns = array('bundle', 'deleted', 'entity_id', 'revision_id', 'delta', 'langcode', FieldableDatabaseStorageController::_fieldColumnName($this->field, 'value'));
+ $columns = array('bundle', 'deleted', 'entity_id', 'revision_id', 'delta', 'langcode', ContentEntityDatabaseStorage::_fieldColumnName($this->field, 'value'));
// Create an entity with four revisions.
$revision_ids = array();
@@ -129,7 +129,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
// Load every revision and check the values.
foreach ($revision_ids as $revision_id) {
- $entity = $storage_controller->loadRevision($revision_id);
+ $entity = $storage->loadRevision($revision_id);
foreach ($values[$revision_id] as $delta => $value) {
if ($delta < $this->field_cardinality) {
$this->assertEqual($entity->{$this->field_name}[$delta]->value, $value);
@@ -141,7 +141,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
}
// Load the "current revision" and check the values.
- $entity = $storage_controller->load($entity->id());
+ $entity = $storage->load($entity->id());
foreach ($values[$revision_id] as $delta => $value) {
if ($delta < $this->field_cardinality) {
$this->assertEqual($entity->{$this->field_name}[$delta]->value, $value);
@@ -157,7 +157,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
$values = array($bundle, 0, $entity->id(), $entity->getRevisionId(), 0, $unavailable_langcode, mt_rand(1, 127));
db_insert($this->table)->fields($columns)->values($values)->execute();
db_insert($this->revision_table)->fields($columns)->values($values)->execute();
- $entity = $storage_controller->load($entity->id());
+ $entity = $storage->load($entity->id());
$this->assertFalse(array_key_exists($unavailable_langcode, $entity->{$this->field_name}));
}
@@ -259,7 +259,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
function testLongNames() {
// Use one of the longest entity_type names in core.
$entity_type = $bundle = 'entity_test_label_callback';
- $storage_controller = $this->container->get('entity.manager')->getStorageController($entity_type);
+ $storage = $this->container->get('entity.manager')->getStorage($entity_type);
// Create two fields with instances, and generate randome values.
$name_base = drupal_strtolower($this->randomName(FieldConfig::NAME_MAX_LENGTH - 1));
@@ -285,7 +285,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
$entity->save();
// Load the entity back and check the values.
- $entity = $storage_controller->load($entity->id());
+ $entity = $storage->load($entity->id());
foreach ($field_names as $field_name) {
$this->assertEqual($entity->get($field_name)->value, $values[$field_name]);
}
@@ -353,7 +353,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
}
// Ensure that the field tables are still there.
- foreach (FieldableDatabaseStorageController::_fieldSqlSchema($prior_field) as $table_name => $table_info) {
+ foreach (ContentEntityDatabaseStorage::_fieldSqlSchema($prior_field) as $table_name => $table_info) {
$this->assertTrue(db_table_exists($table_name), t('Table %table exists.', array('%table' => $table_name)));
}
}
@@ -377,7 +377,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
'bundle' => $entity_type,
));
$instance->save();
- $tables = array(FieldableDatabaseStorageController::_fieldTableName($field), FieldableDatabaseStorageController::_fieldRevisionTableName($field));
+ $tables = array(ContentEntityDatabaseStorage::_fieldTableName($field), ContentEntityDatabaseStorage::_fieldRevisionTableName($field));
// Verify the indexes we will create do not exist yet.
foreach ($tables as $table) {
@@ -411,7 +411,7 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
// Verify that the tables were not dropped in the process.
field_cache_clear();
- $entity = $this->container->get('entity.manager')->getStorageController($entity_type)->load(1);
+ $entity = $this->container->get('entity.manager')->getStorage($entity_type)->load(1);
$this->assertEqual($entity->$field_name->value, 'field data', t("Index changes performed without dropping the tables"));
}
@@ -450,11 +450,11 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
$this->assertEqual($schema['foreign keys'][$foreign_key_name]['columns'][$foreign_key_name], 'id', 'Foreign key column name modified after update');
// Verify the SQL schema.
- $schemas = FieldableDatabaseStorageController::_fieldSqlSchema($field);
- $schema = $schemas[FieldableDatabaseStorageController::_fieldTableName($field)];
+ $schemas = ContentEntityDatabaseStorage::_fieldSqlSchema($field);
+ $schema = $schemas[ContentEntityDatabaseStorage::_fieldTableName($field)];
$this->assertEqual(count($schema['foreign keys']), 1, 'There is 1 foreign key in the schema');
$foreign_key = reset($schema['foreign keys']);
- $foreign_key_column = FieldableDatabaseStorageController::_fieldColumnName($field, $foreign_key_name);
+ $foreign_key_column = ContentEntityDatabaseStorage::_fieldColumnName($field, $foreign_key_name);
$this->assertEqual($foreign_key['table'], $foreign_key_name, 'Foreign key table name preserved in the schema');
$this->assertEqual($foreign_key['columns'][$foreign_key_column], 'id', 'Foreign key column name preserved in the schema');
}
@@ -504,9 +504,9 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
'type' => 'test_field',
));
$expected = 'short_entity_type__short_field_name';
- $this->assertEqual(FieldableDatabaseStorageController::_fieldTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected);
$expected = 'short_entity_type_revision__short_field_name';
- $this->assertEqual(FieldableDatabaseStorageController::_fieldRevisionTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected);
// Short entity type, long field name
$entity_type = 'short_entity_type';
@@ -517,9 +517,9 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
'type' => 'test_field',
));
$expected = 'short_entity_type__' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected);
$expected = 'short_entity_type_r__' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldRevisionTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected);
// Long entity type, short field name
$entity_type = 'long_entity_type_abcdefghijklmnopqrstuvwxyz';
@@ -530,9 +530,9 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
'type' => 'test_field',
));
$expected = 'long_entity_type_abcdefghijklmnopq__' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected);
$expected = 'long_entity_type_abcdefghijklmnopq_r__' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldRevisionTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected);
// Long entity type and field name.
$entity_type = 'long_entity_type_abcdefghijklmnopqrstuvwxyz';
@@ -543,17 +543,17 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
'type' => 'test_field',
));
$expected = 'long_entity_type_abcdefghijklmnopq__' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected);
$expected = 'long_entity_type_abcdefghijklmnopq_r__' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldRevisionTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected);
// Try creating a second field and check there are no clashes.
$field2 = entity_create('field_config', array(
'entity_type' => $entity_type,
'name' => $field_name . '2',
'type' => 'test_field',
));
- $this->assertNotEqual(FieldableDatabaseStorageController::_fieldTableName($field), FieldableDatabaseStorageController::_fieldTableName($field2));
- $this->assertNotEqual(FieldableDatabaseStorageController::_fieldRevisionTableName($field), FieldableDatabaseStorageController::_fieldRevisionTableName($field2));
+ $this->assertNotEqual(ContentEntityDatabaseStorage::_fieldTableName($field), ContentEntityDatabaseStorage::_fieldTableName($field2));
+ $this->assertNotEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), ContentEntityDatabaseStorage::_fieldRevisionTableName($field2));
// Deleted field.
$field = entity_create('field_config', array(
@@ -563,9 +563,9 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
'deleted' => TRUE,
));
$expected = 'field_deleted_data_' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected);
$expected = 'field_deleted_revision_' . substr(hash('sha256', $field->uuid), 0, 10);
- $this->assertEqual(FieldableDatabaseStorageController::_fieldRevisionTableName($field), $expected);
+ $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected);
}
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php
index 45fd696..2e68569 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Entity;
use Drupal\Core\Entity\ContentEntityInterface;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\Core\Language\Language;
use Drupal\field\Field as FieldService;
@@ -31,7 +31,7 @@ class FieldTranslationSqlStorageTest extends EntityLanguageTestBase {
public function testFieldSqlStorage() {
$entity_type = 'entity_test_mul';
- $controller = $this->entityManager->getStorageController($entity_type);
+ $controller = $this->entityManager->getStorage($entity_type);
$values = array(
$this->field_name => $this->randomName(),
$this->untranslatable_field_name => $this->randomName(),
@@ -93,8 +93,8 @@ class FieldTranslationSqlStorageTest extends EntityLanguageTestBase {
foreach ($fields as $field_name) {
$field = FieldService::fieldInfo()->getField($entity_type, $field_name);
$tables = array(
- FieldableDatabaseStorageController::_fieldTableName($field),
- FieldableDatabaseStorageController::_fieldRevisionTableName($field),
+ ContentEntityDatabaseStorage::_fieldTableName($field),
+ ContentEntityDatabaseStorage::_fieldRevisionTableName($field),
);
foreach ($tables as $table) {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/LinksTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/LinksTest.php
index 61f61b5..4d7a735 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Menu/LinksTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/LinksTest.php
@@ -267,7 +267,7 @@ class LinksTest extends WebTestBase {
\Drupal::service('router.builder')->rebuild();
menu_link_rebuild_defaults();
$result = $menu_link = \Drupal::entityQuery('menu_link')->condition('machine_name', 'menu_test')->execute();
- $menu_links = \Drupal::entityManager()->getStorageController('menu_link')->loadMultiple($result);
+ $menu_links = \Drupal::entityManager()->getStorage('menu_link')->loadMultiple($result);
$this->assertEqual(count($menu_links), 1);
$menu_link = reset($menu_links);
$this->assertEqual($menu_link->machine_name, 'menu_test');
@@ -275,7 +275,7 @@ class LinksTest extends WebTestBase {
// Uninstall the module and ensure the menu link got removed.
\Drupal::moduleHandler()->uninstall(array('menu_test'));
$result = $menu_link = \Drupal::entityQuery('menu_link')->condition('machine_name', 'menu_test')->execute();
- $menu_links = \Drupal::entityManager()->getStorageController('menu_link')->loadMultiple($result);
+ $menu_links = \Drupal::entityManager()->getStorage('menu_link')->loadMultiple($result);
$this->assertEqual(count($menu_links), 0);
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/LocalTasksTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/LocalTasksTest.php
index 92de333..5de7b58 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Menu/LocalTasksTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/LocalTasksTest.php
@@ -111,7 +111,7 @@ class LocalTasksTest extends WebTestBase {
// Test that we we correctly apply the active class to tabs where one of the
// request attributes is upcast to an entity object.
- $entity = \Drupal::entityManager()->getStorageController('entity_test')->create(array('bundle' => 'test'));
+ $entity = \Drupal::entityManager()->getStorage('entity_test')->create(array('bundle' => 'test'));
$entity->save();
$this->drupalGet('menu-local-task-test-upcasting/1/sub1');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterRebuildTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterRebuildTest.php
index f3d43b2..59d0f50 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterRebuildTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterRebuildTest.php
@@ -52,7 +52,7 @@ class MenuRouterRebuildTest extends WebTestBase {
\Drupal::service('router.builder')->rebuild();
// Check that the language context was not used for building the menu item.
- $menu_items = \Drupal::entityManager()->getStorageController('menu_link')->loadByProperties(array('route_name' => 'menu_test.context'));
+ $menu_items = \Drupal::entityManager()->getStorage('menu_link')->loadByProperties(array('route_name' => 'menu_test.context'));
$menu_item = reset($menu_items);
$this->assertTrue($menu_item['link_title'] == 'English', 'Config context overrides are ignored when rebuilding menu router items.');
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
index 44cccb2..63b96f7 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
@@ -126,7 +126,7 @@ class AdminTest extends WebTestBase {
->condition('route_name', $routes)
->execute();
- $menu_items = \Drupal::entityManager()->getStorageController('menu_link')->loadMultiple($menu_link_ids);
+ $menu_items = \Drupal::entityManager()->getStorage('menu_link')->loadMultiple($menu_link_ids);
foreach ($menu_items as &$menu_item) {
_menu_link_translate($menu_item);
}
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 8083f89..8bdfdc2 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -620,7 +620,7 @@ function hook_contextual_links_alter(array &$links, $group, array $route_paramet
if ($group == 'menu') {
// Dynamically use the menu name for the title of the menu_edit contextual
// link.
- $menu = \Drupal::entityManager()->getStorageController('menu')->load($route_parameters['menu']);
+ $menu = \Drupal::entityManager()->getStorage('menu')->load($route_parameters['menu']);
$links['menu_edit']['title'] = t('Edit menu: !label', array('!label' => $menu->label()));
}
}
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 081d68d..b746d01 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -1734,15 +1734,15 @@ function system_get_module_admin_tasks($module, $info) {
if (\Drupal::moduleHandler()->implementsHook($module, 'permission')) {
/** @var \Drupal\Core\Access\AccessManager $access_manager */
$access_manager = \Drupal::service('access_manager');
- /** @var \Drupal\menu_link\MenuLinkStorageControllerInterface $menu_link_storage_controller */
- $menu_link_storage_controller = \Drupal::entityManager()
- ->getStorageController('menu_link');
+ /** @var \Drupal\menu_link\MenuLinkStorageInterface $menu_link_storage */
+ $menu_link_storage = \Drupal::entityManager()
+ ->getStorage('menu_link');
if ($access_manager->checkNamedRoute('user.admin_permissions', array(), \Drupal::currentUser())) {
$path = \Drupal::urlGenerator()
->getPathFromRoute('user.admin_permissions');
$options = array();
$options['fragment'] = 'module-' . $module;
- $menu_link = $menu_link_storage_controller->create(array(
+ $menu_link = $menu_link_storage->create(array(
'route_name' => 'user.admin_permissions',
'link_path' => $path,
'title' => t('Configure @module permissions', array('@module' => $info['name'])),
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 8b33daf..dec7c7c 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
@@ -16,7 +16,7 @@ use Drupal\Core\Entity\Entity;
* id = "entity_cache_test",
* label = @Translation("Entity cache test"),
* controllers = {
- * "storage" = "Drupal\Core\Entity\DatabaseStorageController",
+ * "storage" = "Drupal\Core\Entity\EntityDatabaseStorage",
* }
* )
*/
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php
index 98ac7cc..a9d114a 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php
@@ -104,7 +104,7 @@ class EntityTestController extends ControllerBase {
public function listReferencingEntities($entity_reference_field_name, $referenced_entity_type, $referenced_entity_id) {
// Early return if the referenced entity does not exist (or is deleted).
$referenced_entity = $this->entityManager()
- ->getStorageController($referenced_entity_type)
+ ->getStorage($referenced_entity_type)
->load($referenced_entity_id);
if ($referenced_entity === NULL) {
return array();
@@ -114,7 +114,7 @@ class EntityTestController extends ControllerBase {
->get('entity_test')
->condition($entity_reference_field_name . '.target_id', $referenced_entity_id);
$entities = $this->entityManager()
- ->getStorageController('entity_test')
+ ->getStorage('entity_test')
->loadMultiple($query->execute());
return $this->entityManager()
->getViewBuilder('entity_test')
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 1f93df1..55a1611 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
@@ -10,7 +10,7 @@ namespace Drupal\entity_test\Entity;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Language\Language;
use Drupal\user\EntityOwnerInterface;
use Drupal\user\UserInterface;
@@ -51,10 +51,10 @@ class EntityTest extends ContentEntityBase implements EntityOwnerInterface {
/**
* {@inheritdoc}
*/
- public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
- parent::preCreate($storage_controller, $values);
+ public static function preCreate(EntityStorageInterface $storage, array &$values) {
+ parent::preCreate($storage, $values);
if (empty($values['type'])) {
- $values['type'] = $storage_controller->getEntityTypeId();
+ $values['type'] = $storage->getEntityTypeId();
}
}
diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Controller/FormTestController.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Controller/FormTestController.php
index b7ed78c..ad96815 100644
--- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Controller/FormTestController.php
+++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Controller/FormTestController.php
@@ -28,7 +28,7 @@ class FormTestController extends ControllerBase {
'type' => 'page',
'langcode' => Language::LANGCODE_NOT_SPECIFIED,
);
- $node1 = $this->entityManager()->getStorageController('node')->create($values);
+ $node1 = $this->entityManager()->getStorage('node')->create($values);
$node2 = clone($node1);
$return['node_form_1'] = $this->entityFormBuilder()->getForm($node1);
$return['node_form_2'] = $this->entityFormBuilder()->getForm($node2);
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php
index fb06df8..0312a9d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php
@@ -28,7 +28,7 @@ class TaxonomyController extends ControllerBase {
* The taxonomy term add form.
*/
public function addForm(VocabularyInterface $taxonomy_vocabulary) {
- $term = $this->entityManager()->getStorageController('taxonomy_term')->create(array('vid' => $taxonomy_vocabulary->id()));
+ $term = $this->entityManager()->getStorage('taxonomy_term')->create(array('vid' => $taxonomy_vocabulary->id()));
if ($this->moduleHandler()->moduleExists('language')) {
$term->langcode = language_get_default_langcode('taxonomy_term', $taxonomy_vocabulary->id());
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TermAutocompleteController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TermAutocompleteController.php
index dce3472..ab1db7d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TermAutocompleteController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TermAutocompleteController.php
@@ -13,7 +13,7 @@ use Drupal\Component\Utility\String;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\field\FieldInfo;
-use Drupal\taxonomy\TermStorageControllerInterface;
+use Drupal\taxonomy\TermStorageInterface;
use Drupal\taxonomy\VocabularyInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
@@ -40,9 +40,9 @@ class TermAutocompleteController implements ContainerInjectionInterface {
protected $fieldInfo;
/**
- * Term storage controller.
+ * Term storage.
*
- * @var \Drupal\taxonomy\TermStorageControllerInterface
+ * @var \Drupal\taxonomy\TermStorageInterface
*/
protected $termStorage;
@@ -53,10 +53,10 @@ class TermAutocompleteController implements ContainerInjectionInterface {
* The entity query service.
* @param \Drupal\field\FieldInfo $field_info
* The field info service.
- * @param \Drupal\taxonomy\TermStorageControllerInterface $term_storage
- * The term storage controller.
+ * @param \Drupal\taxonomy\TermStorageInterface $term_storage
+ * The term storage.
*/
- public function __construct(QueryInterface $term_entity_query, FieldInfo $field_info, TermStorageControllerInterface $term_storage) {
+ public function __construct(QueryInterface $term_entity_query, FieldInfo $field_info, TermStorageInterface $term_storage) {
$this->termEntityQuery = $term_entity_query;
$this->fieldInfo = $field_info;
$this->termStorage = $term_storage;
@@ -69,7 +69,7 @@ class TermAutocompleteController implements ContainerInjectionInterface {
return new static(
$container->get('entity.query')->get('taxonomy_term'),
$container->get('field.info'),
- $container->get('entity.manager')->getStorageController('taxonomy_term')
+ $container->get('entity.manager')->getStorage('taxonomy_term')
);
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
index 38c84e1..4550acb 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
@@ -8,7 +8,7 @@
namespace Drupal\taxonomy\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
use Drupal\Core\Language\Language;
@@ -23,7 +23,7 @@ use Drupal\taxonomy\TermInterface;
* label = @Translation("Taxonomy term"),
* bundle_label = @Translation("Vocabulary"),
* controllers = {
- * "storage" = "Drupal\taxonomy\TermStorageController",
+ * "storage" = "Drupal\taxonomy\TermStorage",
* "view_builder" = "Drupal\taxonomy\TermViewBuilder",
* "access" = "Drupal\taxonomy\TermAccessController",
* "form" = {
@@ -64,8 +64,8 @@ class Term extends ContentEntityBase implements TermInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
// See if any of the term's children are about to be become orphans.
$orphans = array();
@@ -83,7 +83,7 @@ class Term extends ContentEntityBase implements TermInterface {
// Delete term hierarchy information after looking up orphans but before
// deleting them so that their children/parent information is consistent.
- $storage_controller->deleteTermHierarchy(array_keys($entities));
+ $storage->deleteTermHierarchy(array_keys($entities));
if (!empty($orphans)) {
entity_delete_multiple('taxonomy_term', $orphans);
@@ -93,14 +93,14 @@ class Term extends ContentEntityBase implements TermInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
// Only change the parents if a value is set, keep the existing values if
// not.
if (isset($this->parent->value)) {
- $storage_controller->deleteTermHierarchy(array($this->id()));
- $storage_controller->updateTermHierarchy($this);
+ $storage->deleteTermHierarchy(array($this->id()));
+ $storage->updateTermHierarchy($this);
}
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php
index f7e3f91..f5a7ba7 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php
@@ -8,7 +8,7 @@
namespace Drupal\taxonomy\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\field\Field;
use Drupal\taxonomy\VocabularyInterface;
@@ -19,7 +19,7 @@ use Drupal\taxonomy\VocabularyInterface;
* id = "taxonomy_vocabulary",
* label = @Translation("Taxonomy vocabulary"),
* controllers = {
- * "storage" = "Drupal\taxonomy\VocabularyStorageController",
+ * "storage" = "Drupal\taxonomy\VocabularyStorage",
* "list_builder" = "Drupal\taxonomy\VocabularyListBuilder",
* "form" = {
* "default" = "Drupal\taxonomy\VocabularyFormController",
@@ -96,8 +96,8 @@ class Vocabulary extends ConfigEntityBase implements VocabularyInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if (!$update) {
entity_invoke_bundle_hook('create', 'taxonomy_term', $this->id());
@@ -115,7 +115,7 @@ class Vocabulary extends ConfigEntityBase implements VocabularyInterface {
}
}
- $fields = \Drupal::entityManager()->getStorageController('field_config')->loadMultiple($field_ids);
+ $fields = \Drupal::entityManager()->getStorage('field_config')->loadMultiple($field_ids);
foreach ($fields as $field) {
$update_field = FALSE;
@@ -134,24 +134,24 @@ class Vocabulary extends ConfigEntityBase implements VocabularyInterface {
// Update bundles.
entity_invoke_bundle_hook('rename', 'taxonomy_term', $this->getOriginalId(), $this->id());
}
- $storage_controller->resetCache($update ? array($this->getOriginalId()) : array());
+ $storage->resetCache($update ? array($this->getOriginalId()) : array());
}
/**
* {@inheritdoc}
*/
- public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::preDelete($storage_controller, $entities);
+ public static function preDelete(EntityStorageInterface $storage, array $entities) {
+ parent::preDelete($storage, $entities);
// Only load terms without a parent, child terms will get deleted too.
- entity_delete_multiple('taxonomy_term', $storage_controller->getToplevelTids(array_keys($entities)));
+ entity_delete_multiple('taxonomy_term', $storage->getToplevelTids(array_keys($entities)));
}
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
$vocabularies = array();
foreach ($entities as $vocabulary) {
@@ -181,7 +181,7 @@ class Vocabulary extends ConfigEntityBase implements VocabularyInterface {
}
}
// Reset caches.
- $storage_controller->resetCache(array_keys($vocabularies));
+ $storage->resetCache(array_keys($vocabularies));
}
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php
index 07b6af1..58fbb12 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php
@@ -59,10 +59,10 @@ class TermDeleteForm extends ContentEntityConfirmFormBase {
*/
public function submit(array $form, array &$form_state) {
$this->entity->delete();
- $storage_controller = $this->entityManager->getStorageController('taxonomy_vocabulary');
- $vocabulary = $storage_controller->load($this->entity->bundle());
+ $storage = $this->entityManager->getStorage('taxonomy_vocabulary');
+ $vocabulary = $storage->load($this->entity->bundle());
- // @todo Move to storage controller http://drupal.org/node/1988712
+ // @todo Move to storage http://drupal.org/node/1988712
taxonomy_check_vocabulary_hierarchy($vocabulary, array('tid' => $this->entity->id()));
drupal_set_message($this->t('Deleted term %name.', array('%name' => $this->entity->getName())));
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php
index e18adaa..bae776c 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php
@@ -8,7 +8,7 @@
namespace Drupal\taxonomy\Form;
use Drupal\Core\Entity\EntityConfirmFormBase;
-use Drupal\taxonomy\TermStorageControllerInterface;
+use Drupal\taxonomy\TermStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -19,17 +19,17 @@ class VocabularyResetForm extends EntityConfirmFormBase {
/**
* The term storage.
*
- * @var \Drupal\taxonomy\TermStorageControllerInterface
+ * @var \Drupal\taxonomy\TermStorageInterface
*/
protected $termStorage;
/**
* Constructs a new VocabularyResetForm object.
*
- * @param \Drupal\taxonomy\TermStorageControllerInterface $term_storage
+ * @param \Drupal\taxonomy\TermStorageInterface $term_storage
* The term storage.
*/
- public function __construct(TermStorageControllerInterface $term_storage) {
+ public function __construct(TermStorageInterface $term_storage) {
$this->termStorage = $term_storage;
}
@@ -38,7 +38,7 @@ class VocabularyResetForm extends EntityConfirmFormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('entity.manager')->getStorageController('taxonomy_term')
+ $container->get('entity.manager')->getStorage('taxonomy_term')
);
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceFieldItemList.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceFieldItemList.php
index e5cb463..2965d5d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceFieldItemList.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceFieldItemList.php
@@ -31,7 +31,7 @@ class TaxonomyTermReferenceFieldItemList extends FieldItemList {
->condition('uuid', $uuids, 'IN')
->execute();
$entities = \Drupal::entityManager()
- ->getStorageController('taxonomy_term')
+ ->getStorage('taxonomy_term')
->loadMultiple($entity_ids);
foreach ($entities as $id => $entity) {
@@ -66,7 +66,7 @@ class TaxonomyTermReferenceFieldItemList extends FieldItemList {
$ids[] = $properties['target_id'];
}
$entities = \Drupal::entityManager()
- ->getStorageController('taxonomy_term')
+ ->getStorage('taxonomy_term')
->loadMultiple($ids);
foreach ($default_value as $delta => $properties) {
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Validation/Constraint/TermParentConstraintValidator.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Validation/Constraint/TermParentConstraintValidator.php
index 53d2411..4532190 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Validation/Constraint/TermParentConstraintValidator.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Validation/Constraint/TermParentConstraintValidator.php
@@ -23,7 +23,7 @@ class TermParentConstraintValidator extends ConstraintValidator {
$parent_term_id = $field_item->value;
// If a non-0 parent term id is specified, ensure it corresponds to a real
// term in the same vocabulary.
- if ($parent_term_id && !\Drupal::entityManager()->getStorageController('taxonomy_term')->loadByProperties(array('tid' => $parent_term_id, 'vid' => $field_item->getEntity()->vid->value))) {
+ if ($parent_term_id && !\Drupal::entityManager()->getStorage('taxonomy_term')->loadByProperties(array('tid' => $parent_term_id, 'vid' => $field_item->getEntity()->vid->value))) {
$this->context->addViolation($constraint->message, array('%id' => $parent_term_id));
}
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/TermName.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/TermName.php
index bbddc4b..d6d270a 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/TermName.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/TermName.php
@@ -24,11 +24,11 @@ use Drupal\views\Plugin\views\argument_validator\Entity;
class TermName extends Entity {
/**
- * The taxonomy term storage controller.
+ * The taxonomy term storage.
*
- * @var \Drupal\taxonomy\TermStorageControllerInterface
+ * @var \Drupal\taxonomy\TermStorageInterface
*/
- protected $termStorageController;
+ protected $termStorage;
/**
* {@inheritdoc}
@@ -37,7 +37,7 @@ class TermName extends Entity {
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_manager);
// Not handling exploding term names.
$this->multipleCapable = FALSE;
- $this->termStorageController = $entity_manager->getStorageController('taxonomy_term');
+ $this->termStorage = $entity_manager->getStorage('taxonomy_term');
}
/**
@@ -70,7 +70,7 @@ class TermName extends Entity {
if ($this->options['transform']) {
$argument = str_replace('-', ' ', $argument);
}
- $terms = $this->termStorageController->loadByProperties(array('name' => $argument));
+ $terms = $this->termStorage->loadByProperties(array('name' => $argument));
if (!$terms) {
// Returned empty array no terms with the name.
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
index f06c479..5806386 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
@@ -54,7 +54,7 @@ class TermFormController extends ContentEntityFormController {
*/
public function form(array $form, array &$form_state) {
$term = $this->entity;
- $vocab_storage = $this->entityManager->getStorageController('taxonomy_vocabulary');
+ $vocab_storage = $this->entityManager->getStorage('taxonomy_vocabulary');
$vocabulary = $vocab_storage->load($term->bundle());
$parent = array_keys(taxonomy_term_load_parents($term->id()));
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php
index 75eb28c..b7b9201 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php
@@ -2,22 +2,22 @@
/**
* @file
- * Definition of Drupal\taxonomy\TermStorageController.
+ * Definition of Drupal\taxonomy\TermStorage.
*/
namespace Drupal\taxonomy;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\Query\QueryInterface;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
/**
* Defines a Controller class for taxonomy terms.
*/
-class TermStorageController extends FieldableDatabaseStorageController implements TermStorageControllerInterface {
+class TermStorage extends ContentEntityDatabaseStorage implements TermStorageInterface {
/**
- * Overrides Drupal\Core\Entity\DatabaseStorageController::create().
+ * {@inheritdoc}
*
* @param array $values
* An array of values to set, keyed by property name. A value for the
@@ -33,7 +33,7 @@ class TermStorageController extends FieldableDatabaseStorageController implement
}
/**
- * Overrides Drupal\Core\Entity\DatabaseStorageController::buildPropertyQuery().
+ * {@inheritdoc}
*/
protected function buildPropertyQuery(QueryInterface $entity_query, array $values) {
if (isset($values['name'])) {
@@ -44,7 +44,7 @@ class TermStorageController extends FieldableDatabaseStorageController implement
}
/**
- * Overrides Drupal\Core\Entity\DatabaseStorageController::resetCache().
+ * {@inheritdoc}
*/
public function resetCache(array $ids = NULL) {
drupal_static_reset('taxonomy_term_count_nodes');
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageControllerInterface.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageInterface.php
index 8002b22..634ff3d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageControllerInterface.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageInterface.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains \Drupal\taxonomy\TermStorageControllerInterface.
+ * Contains \Drupal\taxonomy\TermStorageInterface.
*/
namespace Drupal\taxonomy;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
/**
* Defines a common interface for taxonomy term entity controller classes.
*/
-interface TermStorageControllerInterface extends EntityStorageControllerInterface {
+interface TermStorageInterface extends EntityStorageInterface {
/**
* Removed reference to terms from term_hierarchy.
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php
index 009d871..737f662 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php
@@ -41,11 +41,11 @@ class TermValidationTest extends EntityUnitTestBase {
* Tests the term validation constraints.
*/
public function testValidation() {
- $this->entityManager->getStorageController('taxonomy_vocabulary')->create(array(
+ $this->entityManager->getStorage('taxonomy_vocabulary')->create(array(
'vid' => 'tags',
'name' => 'Tags',
))->save();
- $term = $this->entityManager->getStorageController('taxonomy_term')->create(array(
+ $term = $this->entityManager->getStorage('taxonomy_term')->create(array(
'name' => 'test',
'vid' => 'tags',
));
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php
index ec22ffd..f015a2d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php
@@ -96,7 +96,7 @@ class VocabularyTest extends TaxonomyTestBase {
$this->drupalPostForm('admin/structure/taxonomy', $edit, t('Save'));
// Load the vocabularies from the database.
- $this->container->get('entity.manager')->getStorageController('taxonomy_vocabulary')->resetCache();
+ $this->container->get('entity.manager')->getStorage('taxonomy_vocabulary')->resetCache();
$new_vocabularies = entity_load_multiple('taxonomy_vocabulary');
// Check that the weights are saved in the database correctly.
@@ -135,7 +135,7 @@ class VocabularyTest extends TaxonomyTestBase {
$this->assertText(t('Created new vocabulary'), 'New vocabulary was created.');
// Check the created vocabulary.
- $this->container->get('entity.manager')->getStorageController('taxonomy_vocabulary')->resetCache();
+ $this->container->get('entity.manager')->getStorage('taxonomy_vocabulary')->resetCache();
$vocabulary = entity_load('taxonomy_vocabulary', $vid);
$this->assertTrue($vocabulary, 'Vocabulary found.');
@@ -148,7 +148,7 @@ class VocabularyTest extends TaxonomyTestBase {
// Confirm deletion.
$this->drupalPostForm(NULL, NULL, t('Delete'));
$this->assertRaw(t('Deleted vocabulary %name.', array('%name' => $vocabulary->name)), 'Vocabulary deleted.');
- $this->container->get('entity.manager')->getStorageController('taxonomy_vocabulary')->resetCache();
+ $this->container->get('entity.manager')->getStorage('taxonomy_vocabulary')->resetCache();
$this->assertFalse(entity_load('taxonomy_vocabulary', $vid), 'Vocabulary not found.');
}
}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUnitTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUnitTest.php
index a03d17f..ae757f3 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUnitTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUnitTest.php
@@ -127,7 +127,7 @@ class VocabularyUnitTest extends TaxonomyTestBase {
$this->assertIdentical($loaded_order, $expected_order);
// Test loading vocabularies by their properties.
- $controller = $this->container->get('entity.manager')->getStorageController('taxonomy_vocabulary');
+ $controller = $this->container->get('entity.manager')->getStorage('taxonomy_vocabulary');
// Fetch vocabulary 1 by name.
$vocabulary = current($controller->loadByProperties(array('name' => $vocabulary1->name)));
$this->assertEqual($vocabulary->id(), $vocabulary1->id(), 'Vocabulary loaded successfully by name.');
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorage.php
index 249b0b8..f14b951 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorage.php
@@ -2,18 +2,18 @@
/**
* @file
- * Definition of Drupal\taxonomy\VocabularyStorageController.
+ * Definition of Drupal\taxonomy\VocabularyStorage.
*/
namespace Drupal\taxonomy;
use Drupal\Core\Cache\Cache;
-use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Config\Entity\ConfigEntityStorage;
/**
* Defines a controller class for taxonomy vocabularies.
*/
-class VocabularyStorageController extends ConfigStorageController implements VocabularyStorageControllerInterface {
+class VocabularyStorage extends ConfigEntityStorage implements VocabularyStorageInterface {
/**
* {@inheritdoc}
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageControllerInterface.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageInterface.php
index 3b9a925..c4e1aec 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageControllerInterface.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageInterface.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\taxonomy\VocabularyStorageControllerInterface.
+ * Contains \Drupal\taxonomy\VocabularyStorageInterface.
*/
namespace Drupal\taxonomy;
-use Drupal\Core\Config\Entity\ConfigStorageControllerInterface;
+use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
/**
* Defines a common interface for taxonomy vocabulary entity controller classes.
*/
-interface VocabularyStorageControllerInterface extends ConfigStorageControllerInterface {
+interface VocabularyStorageInterface extends ConfigEntityStorageInterface {
/**
* Gets top-level term IDs of vocabularies.
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 62952af..d5a307e 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -6,7 +6,7 @@
*/
use Drupal\Component\Utility\Tags;
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\Core\Entity\EntityInterface;
use Drupal\file\FileInterface;
use Drupal\node\Entity\Node;
@@ -399,7 +399,7 @@ function taxonomy_term_is_page(Term $term) {
* Clear all static cache variables for terms.
*/
function taxonomy_terms_static_reset() {
- \Drupal::entityManager()->getStorageController('taxonomy_term')->resetCache();
+ \Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
}
/**
@@ -409,7 +409,7 @@ function taxonomy_terms_static_reset() {
* An array of ids to reset in entity controller cache.
*/
function taxonomy_vocabulary_static_reset(array $ids = NULL) {
- \Drupal::entityManager()->getStorageController('taxonomy_vocabulary')->resetCache($ids);
+ \Drupal::entityManager()->getStorage('taxonomy_vocabulary')->resetCache($ids);
}
/**
@@ -447,7 +447,7 @@ function taxonomy_term_load_parents($tid) {
$parents = &drupal_static(__FUNCTION__, array());
if ($tid && !isset($parents[$tid])) {
- $tids = \Drupal::entityManager()->getStorageController('taxonomy_term')->loadParents($tid);
+ $tids = \Drupal::entityManager()->getStorage('taxonomy_term')->loadParents($tid);
$parents[$tid] = entity_load_multiple('taxonomy_term', $tids);
}
@@ -495,7 +495,7 @@ function taxonomy_term_load_children($tid, $vid = NULL) {
$children = &drupal_static(__FUNCTION__, array());
if ($tid && !isset($children[$tid])) {
- $tids = \Drupal::entityManager()->getStorageController('taxonomy_term')->loadChildren($tid);
+ $tids = \Drupal::entityManager()->getStorage('taxonomy_term')->loadChildren($tid);
$children[$tid] = entity_load_multiple('taxonomy_term', $tids);
}
@@ -536,7 +536,7 @@ function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities
$parents[$vid] = array();
$terms[$vid] = array();
- $result = \Drupal::entityManager()->getStorageController('taxonomy_term')->loadTree($vid);
+ $result = \Drupal::entityManager()->getStorage('taxonomy_term')->loadTree($vid);
foreach ($result as $term) {
$children[$vid][$term->parent][] = $term->tid;
@@ -824,7 +824,7 @@ function taxonomy_node_insert(EntityInterface $node) {
function taxonomy_build_node_index($node) {
// We maintain a denormalized table of term/node relationships, containing
// only data for current, published nodes.
- if (!\Drupal::config('taxonomy.settings')->get('maintain_index_table') || !(\Drupal::entityManager()->getStorageController('node') instanceof FieldableDatabaseStorageController)) {
+ if (!\Drupal::config('taxonomy.settings')->get('maintain_index_table') || !(\Drupal::entityManager()->getStorage('node') instanceof ContentEntityDatabaseStorage)) {
return;
}
diff --git a/core/modules/taxonomy/taxonomy.tokens.inc b/core/modules/taxonomy/taxonomy.tokens.inc
index f89f0a6..ce331da 100644
--- a/core/modules/taxonomy/taxonomy.tokens.inc
+++ b/core/modules/taxonomy/taxonomy.tokens.inc
@@ -176,7 +176,7 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options =
break;
case 'node-count':
- $replacements[$original] = \Drupal::entityManager()->getStorageController('taxonomy_term')->nodeCount($vocabulary->id());
+ $replacements[$original] = \Drupal::entityManager()->getStorage('taxonomy_term')->nodeCount($vocabulary->id());
break;
}
}
diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc
index e2eb59f..59b94ff 100644
--- a/core/modules/taxonomy/taxonomy.views.inc
+++ b/core/modules/taxonomy/taxonomy.views.inc
@@ -5,7 +5,7 @@
* Provide views data for taxonomy.module.
*/
-use Drupal\Core\Entity\FieldableDatabaseStorageController;
+use Drupal\Core\Entity\ContentEntityDatabaseStorage;
use Drupal\field\FieldConfigInterface;
/**
@@ -448,7 +448,7 @@ function taxonomy_field_views_data_views_data_alter(array &$data, FieldConfigInt
'id' => 'entity_reverse',
'field_name' => $field_name,
'entity_type' => $entity_type_id,
- 'field table' => FieldableDatabaseStorageController::_fieldTableName($field),
+ 'field table' => ContentEntityDatabaseStorage::_fieldTableName($field),
'field field' => $field_name . '_target_id',
'base' => $entity_type->getBaseTable(),
'base field' => $entity_type->getKey('id'),
diff --git a/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php b/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php
index e1efa12..aecf257 100644
--- a/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php
+++ b/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php
@@ -251,7 +251,7 @@ class TextFieldTest extends WebTestBase {
$this->assertText(t('entity_test @id has been updated.', array('@id' => $id)), 'Entity was updated');
// Display the entity.
- $this->container->get('entity.manager')->getStorageController('entity_test')->resetCache(array($id));
+ $this->container->get('entity.manager')->getStorage('entity_test')->resetCache(array($id));
$entity = entity_load('entity_test', $id);
$display = entity_get_display($entity->getEntityTypeId(), $entity->bundle(), 'full');
$content = $display->build($entity);
diff --git a/core/modules/tour/lib/Drupal/tour/Entity/Tour.php b/core/modules/tour/lib/Drupal/tour/Entity/Tour.php
index 3a473d7..1361942 100644
--- a/core/modules/tour/lib/Drupal/tour/Entity/Tour.php
+++ b/core/modules/tour/lib/Drupal/tour/Entity/Tour.php
@@ -8,7 +8,7 @@
namespace Drupal\tour\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\tour\TipsBag;
use Drupal\tour\TourInterface;
diff --git a/core/modules/user/lib/Drupal/user/Entity/Role.php b/core/modules/user/lib/Drupal/user/Entity/Role.php
index 0ce5186..81a0ee6 100644
--- a/core/modules/user/lib/Drupal/user/Entity/Role.php
+++ b/core/modules/user/lib/Drupal/user/Entity/Role.php
@@ -9,7 +9,7 @@ namespace Drupal\user\Entity;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\user\RoleInterface;
/**
@@ -19,7 +19,7 @@ use Drupal\user\RoleInterface;
* id = "user_role",
* label = @Translation("Role"),
* controllers = {
- * "storage" = "Drupal\user\RoleStorageController",
+ * "storage" = "Drupal\user\RoleStorage",
* "access" = "Drupal\user\RoleAccessController",
* "list_builder" = "Drupal\user\RoleListBuilder",
* "form" = {
@@ -106,8 +106,8 @@ class Role extends ConfigEntityBase implements RoleInterface {
/**
* {@inheritdoc}
*/
- public static function postLoad(EntityStorageControllerInterface $storage_controller, array &$entities) {
- parent::postLoad($storage_controller, $entities);
+ public static function postLoad(EntityStorageInterface $storage, array &$entities) {
+ parent::postLoad($storage, $entities);
// Sort the queried roles by their weight.
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
uasort($entities, 'static::sort');
@@ -116,10 +116,10 @@ class Role extends ConfigEntityBase implements RoleInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
- if (!isset($this->weight) && ($roles = $storage_controller->loadMultiple())) {
+ if (!isset($this->weight) && ($roles = $storage->loadMultiple())) {
// Set a role weight to make this new role last.
$max = array_reduce($roles, function($max, $role) {
return $max > $role->weight ? $max : $role->weight;
@@ -131,8 +131,8 @@ class Role extends ConfigEntityBase implements RoleInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
Cache::invalidateTags(array('role' => $this->id()));
// Clear render cache.
@@ -142,11 +142,11 @@ class Role extends ConfigEntityBase implements RoleInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
$ids = array_keys($entities);
- $storage_controller->deleteRoleReferences($ids);
+ $storage->deleteRoleReferences($ids);
Cache::invalidateTags(array('role' => $ids));
}
diff --git a/core/modules/user/lib/Drupal/user/Entity/User.php b/core/modules/user/lib/Drupal/user/Entity/User.php
index dd9ac03..3c13a94 100644
--- a/core/modules/user/lib/Drupal/user/Entity/User.php
+++ b/core/modules/user/lib/Drupal/user/Entity/User.php
@@ -8,7 +8,7 @@
namespace Drupal\user\Entity;
use Drupal\Core\Entity\ContentEntityBase;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityMalformedException;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\FieldDefinition;
@@ -22,7 +22,7 @@ use Drupal\user\UserInterface;
* id = "user",
* label = @Translation("User"),
* controllers = {
- * "storage" = "Drupal\user\UserStorageController",
+ * "storage" = "Drupal\user\UserStorage",
* "access" = "Drupal\user\UserAccessController",
* "list_builder" = "Drupal\user\UserListBuilder",
* "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
@@ -77,8 +77,8 @@ class User extends ContentEntityBase implements UserInterface {
/**
* {@inheritdoc}
*/
- static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
- parent::preCreate($storage_controller, $values);
+ static function preCreate(EntityStorageInterface $storage, array &$values) {
+ parent::preCreate($storage, $values);
// Users always have the authenticated user role.
$values['roles'][] = DRUPAL_AUTHENTICATED_RID;
@@ -87,8 +87,8 @@ class User extends ContentEntityBase implements UserInterface {
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageControllerInterface $storage_controller) {
- parent::preSave($storage_controller);
+ public function preSave(EntityStorageInterface $storage) {
+ parent::preSave($storage);
// Update the user password if it has changed.
if ($this->isNew() || ($this->pass->value && $this->pass->value != $this->original->pass->value)) {
@@ -119,8 +119,8 @@ class User extends ContentEntityBase implements UserInterface {
/**
* {@inheritdoc}
*/
- public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) {
- parent::postSave($storage_controller, $update);
+ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+ parent::postSave($storage, $update);
if ($update) {
// If the password has been changed, delete all open sessions for the
@@ -134,8 +134,8 @@ class User extends ContentEntityBase implements UserInterface {
// Update user roles if changed.
if ($this->getRoles() != $this->original->getRoles()) {
- $storage_controller->deleteUserRoles(array($this->id()));
- $storage_controller->saveRoles($this);
+ $storage->deleteUserRoles(array($this->id()));
+ $storage->saveRoles($this);
}
// If the user was blocked, delete the user's sessions to force a logout.
@@ -153,7 +153,7 @@ class User extends ContentEntityBase implements UserInterface {
else {
// Save user roles.
if (count($this->getRoles()) > 1) {
- $storage_controller->saveRoles($this);
+ $storage->saveRoles($this);
}
}
}
@@ -161,12 +161,12 @@ class User extends ContentEntityBase implements UserInterface {
/**
* {@inheritdoc}
*/
- public static function postDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
- parent::postDelete($storage_controller, $entities);
+ public static function postDelete(EntityStorageInterface $storage, array $entities) {
+ parent::postDelete($storage, $entities);
$uids = array_keys($entities);
\Drupal::service('user.data')->delete(NULL, $uids);
- $storage_controller->deleteUserRoles($uids);
+ $storage->deleteUserRoles($uids);
}
/**
@@ -247,7 +247,7 @@ class User extends ContentEntityBase implements UserInterface {
return TRUE;
}
- $roles = \Drupal::entityManager()->getStorageController('user_role')->loadMultiple($this->getRoles());
+ $roles = \Drupal::entityManager()->getStorage('user_role')->loadMultiple($this->getRoles());
foreach ($roles as $role) {
if ($role->hasPermission($permission)) {
diff --git a/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php b/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php
index dcc6845..4dd180f 100644
--- a/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php
+++ b/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php