diff --git a/core/includes/entity.api.php b/core/includes/entity.api.php index fb076b6..db5fb77 100644 --- a/core/includes/entity.api.php +++ b/core/includes/entity.api.php @@ -26,8 +26,8 @@ function hook_entity_info(&$entity_info) { // Add a form controller for a custom node form without overriding the default // node form. To override the default node form, use hook_entity_info_alter() - // to alter $entity_info['node']['form_controller_class']['default']. - $entity_info['node']['form_controller_class']['mymodule_foo'] = 'Drupal\mymodule\NodeFooFormController'; + // to alter $entity_info['node']['controllers']['form']['default']. + $entity_info['node']['controllers']['form']['mymodule_foo'] = 'Drupal\mymodule\NodeFooFormController'; } /** @@ -157,7 +157,7 @@ function hook_entity_bundle_info_alter(&$bundles) { function hook_entity_info_alter(&$entity_info) { // Set the controller class for nodes to an alternate implementation of the // Drupal\Core\Entity\EntityStorageControllerInterface interface. - $entity_info['node']['controller_class'] = 'Drupal\mymodule\MyCustomNodeStorageController'; + $entity_info['node']['controllers']['storage'] = 'Drupal\mymodule\MyCustomNodeStorageController'; } /** diff --git a/core/includes/entity.inc b/core/includes/entity.inc index 708706e..f7992a8 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -232,8 +232,8 @@ function entity_load_by_uuid($entity_type, $uuid, $reset = FALSE) { * 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 - * 'controller_class' key in the entity plugin annotation. These classes can - * either implement the Drupal\Core\Entity\EntityStorageControllerInterface + * "controllers['storage']" key in the entity plugin annotation. These classes + * can either implement the Drupal\Core\Entity\EntityStorageControllerInterface * interface, or, most commonly, extend the * Drupal\Core\Entity\DatabaseStorageController class. * See Drupal\node\Plugin\Core\Entity\Node and Drupal\node\NodeStorageController diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index be46ac9..36d32da 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -27,23 +27,40 @@ * Drupal\Core\Entity\Entity. * - base_table: The name of the entity type's base table. Used by * Drupal\Core\Entity\DatabaseStorageController. - * - controller_class: The name of the class that is used to load the objects. - * The class must implement - * Drupal\Core\Entity\EntityStorageControllerInterface. Defaults to - * Drupal\Core\Entity\DatabaseStorageController. + * - controllers: An associative array where the keys are the names of different + * controller types (listed below) and the values are the names of the classes + * that implement that controller. + * - storage: The name of the class that is used to load the objects. + * The class must implement + * Drupal\Core\Entity\EntityStorageControllerInterface. Defaults to + * Drupal\Core\Entity\DatabaseStorageController. + * - form: (optional) 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 operations. The name of the operation is passed also + * to the form controller's constructor, so that one class can be used for + * multiple entity forms when the forms are similar. Defaults to + * Drupal\Core\Entity\EntityFormController. + * - list: (optional) The name of the class that provides + * listings of the entities. The class must implement + * Drupal\Core\Entity\EntityListControllerInterface. Defaults to + * Drupal\Core\Entity\EntityListController. + * - render: The name of the class that is used to render the + * entities. Defaults to Drupal\Core\Entity\EntityRenderController. + * - access: The name of the class that is used for access + * checks. The class must implement + * Drupal\Core\Entity\EntityAccessControllerInterface. Defaults to + * Drupal\Core\Entity\EntityAccessController. + * - translation: (optional) The name of the translation + * controller class that should be used to handle the translation process. + * See Drupal\translation_entity\EntityTranslationControllerInterface for more + * information. * - fieldable: (optional) Boolean indicating whether fields can be attached * to entities of this type. Defaults to FALSE. * - field_cache: (optional) Boolean indicating whether the Field API's * Field API's persistent cache of field data should be used. The persistent * cache should usually only be disabled if a higher level persistent cache * is available for the entity type. Defaults to TRUE. - * - form_controller_class: (optional) 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 operations. The name of the operation is passed also - * to the form controller's constructor, so that one class can be used for - * multiple entity forms when the forms are similar. Defaults to - * Drupal\Core\Entity\EntityFormController. * - label: The human-readable name of the type. * - bundle_label: The human-readable name of the entity bundles, e.g. * Vocabulary. @@ -58,20 +75,6 @@ * an entity, you can instead specify a callback function here, which will * be called to determine the entity label. See also the * Drupal\Core\Entity\Entity::label() method, which implements this logic. - * - list_controller_class: (optional) The name of the class that provides - * listings of the entities. The class must implement - * Drupal\Core\Entity\EntityListControllerInterface. Defaults to - * Drupal\Core\Entity\EntityListController. - * - render_controller_class: The name of the class that is used to render the - * entities. Defaults to Drupal\Core\Entity\EntityRenderController. - * - access_controller_class: The name of the class that is used for access - * checks. The class must implement - * Drupal\Core\Entity\EntityAccessControllerInterface. Defaults to - * Drupal\Core\Entity\EntityAccessController. - * - translation_controller_class: (optional) The name of the translation - * controller class that should be used to handle the translation process. - * See Drupal\translation_entity\EntityTranslationControllerInterface for more - * information. * - static_cache: (optional) Boolean indicating whether entities should be * statically cached during a page request. Used by * Drupal\Core\Entity\DatabaseStorageController. Defaults to TRUE. @@ -146,18 +149,20 @@ class EntityManager extends PluginManagerBase { */ protected $defaults = array( 'class' => 'Drupal\Core\Entity\Entity', - 'controller_class' => 'Drupal\Core\Entity\DatabaseStorageController', + 'controllers' => array( + 'storage' => 'Drupal\Core\Entity\DatabaseStorageController', + 'form' => array( + 'default' => 'Drupal\Core\Entity\EntityFormController', + ), + 'list' => 'Drupal\Core\Entity\EntityListController', + 'access' => 'Drupal\Core\Entity\EntityAccessController', + ), 'entity_keys' => array( 'revision' => '', 'bundle' => '', ), 'fieldable' => FALSE, 'field_cache' => TRUE, - 'form_controller_class' => array( - 'default' => 'Drupal\Core\Entity\EntityFormController', - ), - 'list_controller_class' => 'Drupal\Core\Entity\EntityListController', - 'access_controller_class' => 'Drupal\Core\Entity\EntityAccessController', 'static_cache' => TRUE, 'translation' => array(), 'permission_granularity' => 'entity_type', @@ -215,6 +220,7 @@ public function processDefinition(&$definition, $plugin_id) { */ public function getControllerClass($entity_type, $controller_type, $nested = NULL) { $definition = $this->getDefinition($entity_type); + $definition = $definition['controllers']; if (empty($definition[$controller_type])) { throw new \InvalidArgumentException(sprintf('The entity (%s) did not specify a %s.', $entity_type, $controller_type)); } @@ -248,7 +254,7 @@ public function getControllerClass($entity_type, $controller_type, $nested = NUL */ public function getStorageController($entity_type) { if (!isset($this->controllers['storage'][$entity_type])) { - $class = $this->getControllerClass($entity_type, 'controller_class'); + $class = $this->getControllerClass($entity_type, 'storage'); $this->controllers['storage'][$entity_type] = new $class($entity_type); } return $this->controllers['storage'][$entity_type]; @@ -265,7 +271,7 @@ public function getStorageController($entity_type) { */ public function getListController($entity_type) { if (!isset($this->controllers['listing'][$entity_type])) { - $class = $this->getControllerClass($entity_type, 'list_controller_class'); + $class = $this->getControllerClass($entity_type, 'list'); $this->controllers['listing'][$entity_type] = new $class($entity_type, $this->getStorageController($entity_type)); } return $this->controllers['listing'][$entity_type]; @@ -284,7 +290,7 @@ public function getListController($entity_type) { */ public function getFormController($entity_type, $operation) { if (!isset($this->controllers['form'][$operation][$entity_type])) { - $class = $this->getControllerClass($entity_type, 'form_controller_class', $operation); + $class = $this->getControllerClass($entity_type, 'form', $operation); $this->controllers['form'][$operation][$entity_type] = new $class($operation); } return $this->controllers['form'][$operation][$entity_type]; @@ -301,7 +307,7 @@ public function getFormController($entity_type, $operation) { */ public function getRenderController($entity_type) { if (!isset($this->controllers['render'][$entity_type])) { - $class = $this->getControllerClass($entity_type, 'render_controller_class'); + $class = $this->getControllerClass($entity_type, 'render'); $this->controllers['render'][$entity_type] = new $class($entity_type); } return $this->controllers['render'][$entity_type]; @@ -318,7 +324,7 @@ public function getRenderController($entity_type) { */ public function getAccessController($entity_type) { if (!isset($this->controllers['access'][$entity_type])) { - $class = $this->getControllerClass($entity_type, 'access_controller_class'); + $class = $this->getControllerClass($entity_type, 'access'); $this->controllers['access'][$entity_type] = new $class($entity_type); } return $this->controllers['access'][$entity_type]; diff --git a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php index 4ac5d9a..377a002 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php @@ -10,7 +10,7 @@ /** * Defines a common interface for entity controller classes. * - * All entity controller classes specified via the 'controller_class' key + * All entity controller classes specified via the "controllers['storage']" key * returned by \Drupal\Core\Entity\EntityManager or hook_entity_info_alter() * have to implement this interface. * diff --git a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php index 75d82e8..fb11974 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php @@ -19,12 +19,14 @@ * id = "block", * label = @Translation("Block"), * module = "block", - * controller_class = "Drupal\block\BlockStorageController", - * access_controller_class = "Drupal\block\BlockAccessController", - * render_controller_class = "Drupal\block\BlockRenderController", - * list_controller_class = "Drupal\block\BlockListController", - * form_controller_class = { - * "default" = "Drupal\block\BlockFormController" + * controllers = { + * "storage" = "Drupal\block\BlockStorageController", + * "access" = "Drupal\block\BlockAccessController", + * "render" = "Drupal\block\BlockRenderController", + * "list" = "Drupal\block\BlockListController", + * "form" = { + * "default" = "Drupal\block\BlockFormController" + * } * }, * config_prefix = "block.block", * fieldable = FALSE, diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/Breakpoint.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/Breakpoint.php index c2dff01..dd52e82 100644 --- a/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/Breakpoint.php +++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/Breakpoint.php @@ -23,7 +23,9 @@ * id = "breakpoint", * label = @Translation("Breakpoint"), * module = "breakpoint", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "breakpoint.breakpoint", * entity_keys = { * "id" = "id", diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php index 334d2cb..e36bb68 100644 --- a/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php +++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php @@ -20,7 +20,9 @@ * id = "breakpoint_group", * label = @Translation("Breakpoint group"), * module = "breakpoint", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "breakpoint.breakpoint_group", * entity_keys = { * "id" = "id", diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php index f6e9091..5d569df 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php @@ -20,12 +20,14 @@ * label = @Translation("Comment"), * bundle_label = @Translation("Content type"), * module = "comment", - * controller_class = "Drupal\comment\CommentStorageController", - * render_controller_class = "Drupal\comment\CommentRenderController", - * form_controller_class = { - * "default" = "Drupal\comment\CommentFormController" + * controllers = { + * "storage" = "Drupal\comment\CommentStorageController", + * "render" = "Drupal\comment\CommentRenderController", + * "form" = { + * "default" = "Drupal\comment\CommentFormController" + * }, + * "translation" = "Drupal\comment\CommentTranslationController" * }, - * translation_controller_class = "Drupal\comment\CommentTranslationController", * base_table = "comment", * uri_callback = "comment_uri", * fieldable = TRUE, diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigQueryTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigQueryTest.php index 530868b..c2c1a2a 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigQueryTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigQueryTest.php @@ -17,10 +17,12 @@ * id = "config_query_test", * label = @Translation("Test configuration for query"), * module = "config_test", - * controller_class = "Drupal\config_test\ConfigTestStorageController", - * list_controller_class = "Drupal\Core\Config\Entity\ConfigEntityListController", - * form_controller_class = { - * "default" = "Drupal\config_test\ConfigTestFormController" + * controllers = { + * "storage" = "Drupal\config_test\ConfigTestStorageController", + * "list" = "Drupal\Core\Config\Entity\ConfigEntityListController", + * "form" = { + * "default" = "Drupal\config_test\ConfigTestFormController" + * } * }, * uri_callback = "config_test_uri", * config_prefix = "config_query_test.dynamic", diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php index 28b22cc..b9acf09 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php @@ -18,10 +18,12 @@ * id = "config_test", * label = @Translation("Test configuration"), * module = "config_test", - * controller_class = "Drupal\config_test\ConfigTestStorageController", - * list_controller_class = "Drupal\Core\Config\Entity\ConfigEntityListController", - * form_controller_class = { - * "default" = "Drupal\config_test\ConfigTestFormController" + * controllers = { + * "storage" = "Drupal\config_test\ConfigTestStorageController", + * "list" = "Drupal\Core\Config\Entity\ConfigEntityListController", + * "form" = { + * "default" = "Drupal\config_test\ConfigTestFormController" + * } * }, * uri_callback = "config_test_uri", * config_prefix = "config_test.dynamic", diff --git a/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Category.php b/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Category.php index f01c2f5..ea9a2a9 100644 --- a/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Category.php +++ b/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Category.php @@ -18,10 +18,12 @@ * id = "contact_category", * label = @Translation("Contact category"), * module = "contact", - * controller_class = "Drupal\contact\CategoryStorageController", - * list_controller_class = "Drupal\contact\CategoryListController", - * form_controller_class = { - * "default" = "Drupal\contact\CategoryFormController" + * controllers = { + * "storage" = "Drupal\contact\CategoryStorageController", + * "list" = "Drupal\contact\CategoryListController", + * "form" = { + * "default" = "Drupal\contact\CategoryFormController" + * } * }, * uri_callback = "contact_category_uri", * config_prefix = "contact.category", diff --git a/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Message.php b/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Message.php index 19901b2..d2c175a 100644 --- a/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Message.php +++ b/core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Message.php @@ -18,10 +18,12 @@ * id = "contact_message", * label = @Translation("Contact message"), * module = "contact", - * form_controller_class = { - * "default" = "Drupal\contact\MessageFormController" + * controllers = { + * "render" = "Drupal\contact\MessageRenderController", + * "form" = { + * "default" = "Drupal\contact\MessageFormController" + * } * }, - * render_controller_class = "Drupal\contact\MessageRenderController", * entity_keys = { * "bundle" = "category" * }, diff --git a/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php index 22271ee..76d57b5 100644 --- a/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php +++ b/core/modules/editor/lib/Drupal/editor/Plugin/Core/Entity/Editor.php @@ -18,7 +18,9 @@ * id = "editor", * label = @Translation("Editor"), * module = "editor", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "editor.editor", * entity_keys = { * "id" = "format", diff --git a/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityDisplay.php b/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityDisplay.php index d88967f..ce27574 100644 --- a/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityDisplay.php @@ -19,7 +19,9 @@ * id = "entity_display", * label = @Translation("Entity display"), * module = "entity", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "entity.display", * entity_keys = { * "id" = "id", diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleKeyTestEntity.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleKeyTestEntity.php index 11723b8..cb3debe 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleKeyTestEntity.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleKeyTestEntity.php @@ -17,9 +17,11 @@ * id = "test_entity_bundle_key", * label = @Translation("Test Entity with a bundle key"), * module = "field_test", - * controller_class = "Drupal\field_test\TestEntityController", - * form_controller_class = { - * "default" = "Drupal\field_test\TestEntityFormController" + * controllers = { + * "storage" = "Drupal\field_test\TestEntityController", + * "form" = { + * "default" = "Drupal\field_test\TestEntityFormController" + * } * }, * field_cache = FALSE, * base_table = "test_entity_bundle_key", diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleTestEntity.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleTestEntity.php index ee91584..8769532 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleTestEntity.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/BundleTestEntity.php @@ -17,9 +17,11 @@ * id = "test_entity_bundle", * label = @Translation("Test Entity with a specified bundle"), * module = "field_test", - * controller_class = "Drupal\field_test\TestEntityController", - * form_controller_class = { - * "default" = "Drupal\field_test\TestEntityFormController" + * controllers = { + * "storage" = "Drupal\field_test\TestEntityController", + * "form" = { + * "default" = "Drupal\field_test\TestEntityFormController" + * } * }, * field_cache = FALSE, * base_table = "test_entity_bundle", diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/CacheableTestEntity.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/CacheableTestEntity.php index 6970fa0..516971e 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/CacheableTestEntity.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/CacheableTestEntity.php @@ -17,7 +17,9 @@ * id = "test_cacheable_entity", * label = @Translation("Test Entity, cacheable"), * module = "field_test", - * controller_class = "Drupal\field_test\TestEntityController", + * controllers = { + * "storage" = "Drupal\field_test\TestEntityController" + * }, * field_cache = TRUE, * base_table = "test_entity", * revision_table = "test_entity_revision", diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/TestEntity.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/TestEntity.php index be75dc0..f619721 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/TestEntity.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Core/Entity/TestEntity.php @@ -18,10 +18,12 @@ * id = "test_entity", * label = @Translation("Test Entity"), * module = "field_test", - * controller_class = "Drupal\field_test\TestEntityController", - * render_controller_class = "Drupal\Core\Entity\EntityRenderController", - * form_controller_class = { - * "default" = "Drupal\field_test\TestEntityFormController" + * controllers = { + * "storage" = "Drupal\field_test\TestEntityController", + * "render" = "Drupal\Core\Entity\EntityRenderController", + * "form" = { + * "default" = "Drupal\field_test\TestEntityFormController" + * } * }, * field_cache = FALSE, * base_table = "test_entity", diff --git a/core/modules/file/lib/Drupal/file/Plugin/Core/Entity/File.php b/core/modules/file/lib/Drupal/file/Plugin/Core/Entity/File.php index 080c47a..3cc70fe 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/Core/Entity/File.php +++ b/core/modules/file/lib/Drupal/file/Plugin/Core/Entity/File.php @@ -19,8 +19,10 @@ * id = "file", * label = @Translation("File"), * module = "file", - * controller_class = "Drupal\file\FileStorageController", - * render_controller_class = "Drupal\Core\Entity\EntityRenderController", + * controllers = { + * "storage" = "Drupal\file\FileStorageController", + * "render" = "Drupal\Core\Entity\EntityRenderController" + * }, * base_table = "file_managed", * entity_keys = { * "id" = "fid", diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php index 6dd76f9..454dab5 100644 --- a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php @@ -18,7 +18,9 @@ * id = "filter_format", * label = @Translation("Text format"), * module = "filter", - * controller_class = "Drupal\filter\FilterFormatStorageController", + * controllers = { + * "storage" = "Drupal\filter\FilterFormatStorageController" + * }, * config_prefix = "filter.format", * entity_keys = { * "id" = "format", diff --git a/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php index 2c01d95..0037b91 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Plugin/Core/Entity/ImageStyle.php @@ -18,7 +18,9 @@ * id = "image_style", * label = @Translation("Image style"), * module = "image", - * controller_class = "Drupal\image\ImageStyleStorageController", + * controllers = { + * "storage" = "Drupal\image\ImageStyleStorageController" + * }, * uri_callback = "image_style_entity_uri", * config_prefix = "image.style", * entity_keys = { diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/Display.php b/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/Display.php index 95abe27..ebbd254 100644 --- a/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/Display.php +++ b/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/Display.php @@ -21,7 +21,9 @@ * id = "display", * label = @Translation("Display"), * module = "layout", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "display.bound", * entity_keys = { * "id" = "id", diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/UnboundDisplay.php b/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/UnboundDisplay.php index 712f014..c32316d 100644 --- a/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/UnboundDisplay.php +++ b/core/modules/layout/lib/Drupal/layout/Plugin/Core/Entity/UnboundDisplay.php @@ -24,7 +24,9 @@ * id = "unbound_display", * label = @Translation("Unbound Display"), * module = "layout", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "display.unbound", * entity_keys = { * "id" = "id", diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index addca0f..caf4a28 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -155,9 +155,9 @@ function menu_menu() { * Implements hook_entity_info_alter(). */ function menu_entity_info_alter(&$entity_info) { - $entity_info['menu']['list_controller_class'] = 'Drupal\menu\MenuListController'; + $entity_info['menu']['controllers']['list'] = 'Drupal\menu\MenuListController'; $entity_info['menu']['uri_callback'] = 'menu_uri'; - $entity_info['menu']['form_controller_class'] = array( + $entity_info['menu']['controllers']['form'] = array( 'default' => 'Drupal\menu\MenuFormController', ); } diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php index e367425..8e9ba53 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php @@ -20,12 +20,14 @@ * label = @Translation("Content"), * bundle_label = @Translation("Content type"), * module = "node", - * controller_class = "Drupal\node\NodeStorageController", - * render_controller_class = "Drupal\node\NodeRenderController", - * form_controller_class = { - * "default" = "Drupal\node\NodeFormController" + * controllers = { + * "storage" = "Drupal\node\NodeStorageController", + * "render" = "Drupal\node\NodeRenderController", + * "form" = { + * "default" = "Drupal\node\NodeFormController" + * }, + * "translation" = "Drupal\node\NodeTranslationController" * }, - * translation_controller_class = "Drupal\node\NodeTranslationController", * base_table = "node", * revision_table = "node_revision", * uri_callback = "node_uri", diff --git a/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php b/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php index b65f248..6da0d91 100644 --- a/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php +++ b/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php @@ -18,13 +18,15 @@ * id = "picture_mapping", * label = @Translation("Picture mapping"), * module = "picture", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", - * form_controller_class = { - * "default" = "Drupal\picture\PictureMappingFormController", - * "add" = "Drupal\picture\PictureMappingFormController", - * "duplicate" = "Drupal\picture\PictureMappingFormController" + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", + * "list" = "Drupal\picture\PictureMappingListController", + * "form" = { + * "default" = "Drupal\picture\PictureMappingFormController", + * "add" = "Drupal\picture\PictureMappingFormController", + * "duplicate" = "Drupal\picture\PictureMappingFormController" + * } * }, - * list_controller_class = "Drupal\picture\PictureMappingListController", * list_path = "admin/config/media/picturemapping", * uri_callback = "picture_mapping_uri", * config_prefix = "picture.mappings", diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Core/Entity/Shortcut.php b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Core/Entity/Shortcut.php index fd72e3c..7118641 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Core/Entity/Shortcut.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Core/Entity/Shortcut.php @@ -18,10 +18,12 @@ * id = "shortcut", * label = @Translation("Shortcut set"), * module = "shortcut", - * controller_class = "Drupal\shortcut\ShortcutStorageController", - * list_controller_class = "Drupal\shortcut\ShortcutListController", - * form_controller_class = { - * "default" = "Drupal\shortcut\ShortcutFormController" + * controllers = { + * "storage" = "Drupal\shortcut\ShortcutStorageController", + * "list" = "Drupal\shortcut\ShortcutListController", + * "form" = { + * "default" = "Drupal\shortcut\ShortcutFormController" + * } * }, * config_prefix = "shortcut.set", * entity_keys = { diff --git a/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php b/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php index 4b63d9b..924ca89 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php @@ -18,7 +18,9 @@ * id = "menu", * label = @Translation("Menu"), * module = "system", - * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * controllers = { + * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" + * }, * config_prefix = "menu.menu", * entity_keys = { * "id" = "id", 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 6135bf0..cb0ea4d 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 @@ function testEntityInfoCacheWatchdog() { module_enable(array('entity_cache_test')); $info = state()->get('entity_cache_test'); $this->assertEqual($info['label'], 'Entity Cache Test', 'Entity info label is correct.'); - $this->assertEqual($info['controller_class'], 'Drupal\Core\Entity\DatabaseStorageController', 'Entity controller class info is correct.'); + $this->assertEqual($info['controllers']['storage'], 'Drupal\Core\Entity\DatabaseStorageController', 'Entity controller class info is correct.'); } } diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTest.php index 0bfb73e..731be26 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTest.php @@ -18,12 +18,14 @@ * id = "entity_test", * label = @Translation("Test entity"), * module = "entity_test", - * controller_class = "Drupal\entity_test\EntityTestStorageController", - * access_controller_class = "Drupal\entity_test\EntityTestAccessController", - * form_controller_class = { - * "default" = "Drupal\entity_test\EntityTestFormController" + * controllers = { + * "storage" = "Drupal\entity_test\EntityTestStorageController", + * "access" = "Drupal\entity_test\EntityTestAccessController", + * "form" = { + * "default" = "Drupal\entity_test\EntityTestFormController" + * }, + * "translation" = "Drupal\translation_entity\EntityTranslationControllerNG" * }, - * translation_controller_class = "Drupal\translation_entity\EntityTranslationControllerNG", * base_table = "entity_test", * fieldable = TRUE, * entity_keys = { diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestDefaultAccess.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestDefaultAccess.php index ef50be9..7410b65 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestDefaultAccess.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestDefaultAccess.php @@ -17,7 +17,9 @@ * id = "entity_test_default_access", * label = @Translation("Test entity with default access"), * module = "entity_test", - * controller_class = "Drupal\entity_test\EntityTestStorageController", + * controllers = { + * "storage" = "Drupal\entity_test\EntityTestStorageController" + * }, * base_table = "entity_test", * entity_keys = { * "id" = "id" diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMul.php index 4de550b..6f68308 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMul.php @@ -18,12 +18,14 @@ * id = "entity_test_mul", * label = @Translation("Test entity - data table"), * module = "entity_test", - * controller_class = "Drupal\entity_test\EntityTestMulStorageController", - * access_controller_class = "Drupal\entity_test\EntityTestAccessController", - * form_controller_class = { - * "default" = "Drupal\entity_test\EntityTestFormController" + * controllers = { + * "storage" = "Drupal\entity_test\EntityTestMulStorageController", + * "access" = "Drupal\entity_test\EntityTestAccessController", + * "form" = { + * "default" = "Drupal\entity_test\EntityTestFormController" + * }, + * "translation" = "Drupal\translation_entity\EntityTranslationControllerNG" * }, - * translation_controller_class = "Drupal\translation_entity\EntityTranslationControllerNG", * base_table = "entity_test_mul", * data_table = "entity_test_mul_property_data", * fieldable = TRUE, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMulRev.php index 632ada7..798f401 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestMulRev.php @@ -18,12 +18,14 @@ * id = "entity_test_mulrev", * label = @Translation("Test entity - revisions and data table"), * module = "entity_test", - * controller_class = "Drupal\entity_test\EntityTestMulRevStorageController", - * access_controller_class = "Drupal\entity_test\EntityTestAccessController", - * form_controller_class = { - * "default" = "Drupal\entity_test\EntityTestFormController" + * controllers = { + * "storage" = "Drupal\entity_test\EntityTestMulRevStorageController", + * "access" = "Drupal\entity_test\EntityTestAccessController", + * "form" = { + * "default" = "Drupal\entity_test\EntityTestFormController" + * }, + * "translation" = "Drupal\translation_entity\EntityTranslationControllerNG" * }, - * translation_controller_class = "Drupal\translation_entity\EntityTranslationControllerNG", * base_table = "entity_test_mulrev", * data_table = "entity_test_mulrev_property_data", * revision_table = "entity_test_mulrev_property_revision", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestRev.php index 1afc669..69aa1bf 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestRev.php @@ -18,12 +18,14 @@ * id = "entity_test_rev", * label = @Translation("Test entity - revisions"), * module = "entity_test", - * controller_class = "Drupal\entity_test\EntityTestRevStorageController", - * access_controller_class = "Drupal\entity_test\EntityTestAccessController", - * form_controller_class = { - * "default" = "Drupal\entity_test\EntityTestFormController" + * controllers = { + * "storage" = "Drupal\entity_test\EntityTestRevStorageController", + * "access" = "Drupal\entity_test\EntityTestAccessController", + * "form" = { + * "default" = "Drupal\entity_test\EntityTestFormController" + * }, + * "translation" = "Drupal\translation_entity\EntityTranslationControllerNG" * }, - * translation_controller_class = "Drupal\translation_entity\EntityTranslationControllerNG", * base_table = "entity_test_rev", * revision_table = "entity_test_rev_revision", * fieldable = TRUE, diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php index affe712..805349c 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php @@ -20,13 +20,15 @@ * label = @Translation("Taxonomy term"), * bundle_label = @Translation("Vocabulary"), * module = "taxonomy", - * controller_class = "Drupal\taxonomy\TermStorageController", - * render_controller_class = "Drupal\taxonomy\TermRenderController", - * access_controller_class = "Drupal\taxonomy\TermAccessController", - * form_controller_class = { - * "default" = "Drupal\taxonomy\TermFormController" + * controllers = { + * "storage" = "Drupal\taxonomy\TermStorageController", + * "render" = "Drupal\taxonomy\TermRenderController", + * "access" = "Drupal\taxonomy\TermAccessController", + * "form" = { + * "default" = "Drupal\taxonomy\TermFormController" + * }, + * "translation" = "Drupal\taxonomy\TermTranslationController" * }, - * translation_controller_class = "Drupal\taxonomy\TermTranslationController", * base_table = "taxonomy_term_data", * uri_callback = "taxonomy_term_uri", * fieldable = TRUE, diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php index c125418..b75b5c9 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php @@ -18,10 +18,12 @@ * id = "taxonomy_vocabulary", * label = @Translation("Taxonomy vocabulary"), * module = "taxonomy", - * controller_class = "Drupal\taxonomy\VocabularyStorageController", - * access_controller_class = "Drupal\taxonomy\VocabularyAccessController", - * form_controller_class = { - * "default" = "Drupal\taxonomy\VocabularyFormController" + * controllers = { + * "storage" = "Drupal\taxonomy\VocabularyStorageController", + * "access" = "Drupal\taxonomy\VocabularyAccessController", + * "form" = { + * "default" = "Drupal\taxonomy\VocabularyFormController" + * } * }, * config_prefix = "taxonomy.vocabulary", * entity_keys = { diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php index aee3c67..dbac33b 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php @@ -36,7 +36,7 @@ * path wildcard' info key needs to be defined. * * Every entity type needs a translation controller to be translated. This can - * be specified through the 'translation_controller_class' key in the entity + * be specified through the "controllers['translation']" key in the entity * info. If an entity type is enabled for translation and no translation * controller is defined, Drupal\translation_entity\EntityTranslationController * will be assumed. Every translation controller class must implement @@ -63,7 +63,6 @@ * $info['myentity'] += array( * 'menu_base_path' => 'mymodule/myentity/%my_entity_loader', * 'menu_path_wildcard' => '%my_entity_loader', - * 'translation_controller_class' => 'Drupal\mymodule\MyEntityTranslationController', * 'translation' => array( * 'translation_entity' => array( * 'access_callback' => 'mymodule_myentity_translate_access', @@ -71,6 +70,7 @@ * ), * ), * ); + * $info['myentity']['controllers'] += array('translation' => 'Drupal\mymodule\MyEntityTranslationController'); * } * @endcode * diff --git a/core/modules/translation_entity/translation_entity.module b/core/modules/translation_entity/translation_entity.module index 68eb96d..6363eba 100644 --- a/core/modules/translation_entity/translation_entity.module +++ b/core/modules/translation_entity/translation_entity.module @@ -86,7 +86,7 @@ function translation_entity_entity_info_alter(array &$entity_info) { // matter if it is enabled for translation or not. As a matter of fact we // might need it to correctly switch field translatability when a field is // shared accross different entities. - $info += array('translation_controller_class' => 'Drupal\translation_entity\EntityTranslationController'); + $info['controllers'] += array('translation' => 'Drupal\translation_entity\EntityTranslationController'); // If no menu base path is provided we default to the usual // "entity_type/%entity_type" pattern. @@ -504,7 +504,7 @@ function translation_entity_types_translatable() { function translation_entity_controller($entity_type) { $entity_info = entity_get_info($entity_type); // @todo Throw an exception if the key is missing. - return new $entity_info['translation_controller_class']($entity_type, $entity_info); + return new $entity_info['controllers']['translation']($entity_type, $entity_info); } /** diff --git a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php index f64955c..df61cd9 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php @@ -18,7 +18,9 @@ * id = "user_role", * label = @Translation("Role"), * module = "user", - * controller_class = "Drupal\user\RoleStorageController", + * controllers = { + * "storage" = "Drupal\user\RoleStorageController" + * }, * config_prefix = "user.role", * entity_keys = { * "id" = "id", diff --git a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php index fb7cbbb..234c118 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php @@ -18,15 +18,17 @@ * id = "user", * label = @Translation("User"), * module = "user", - * controller_class = "Drupal\user\UserStorageController", - * render_controller_class = "Drupal\Core\Entity\EntityRenderController", - * access_controller_class = "Drupal\user\UserAccessController", - * form_controller_class = { - * "profile" = "Drupal\user\ProfileFormController", - * "register" = "Drupal\user\RegisterFormController" + * controllers = { + * "storage" = "Drupal\user\UserStorageController", + * "access" = "Drupal\user\UserAccessController", + * "render" = "Drupal\Core\Entity\EntityRenderController", + * "form" = { + * "profile" = "Drupal\user\ProfileFormController", + * "register" = "Drupal\user\RegisterFormController" + * }, + * "translation" = "Drupal\user\ProfileTranslationController" * }, * default_operation = "profile", - * translation_controller_class = "Drupal\user\ProfileTranslationController", * base_table = "users", * uri_callback = "user_uri", * label_callback = "user_label", diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php index 8e83ea2..cac7555 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php @@ -22,13 +22,15 @@ * id = "view", * label = @Translation("View"), * module = "views", - * controller_class = "Drupal\views\ViewStorageController", - * list_controller_class = "Drupal\views_ui\ViewListController", - * form_controller_class = { - * "edit" = "Drupal\views_ui\ViewEditFormController", - * "add" = "Drupal\views_ui\ViewAddFormController", - * "preview" = "Drupal\views_ui\ViewPreviewFormController", - * "clone" = "Drupal\views_ui\ViewCloneFormController" + * controllers = { + * "storage" = "Drupal\views\ViewStorageController", + * "list" = "Drupal\views_ui\ViewListController", + * "form" = { + * "edit" = "Drupal\views_ui\ViewEditFormController", + * "add" = "Drupal\views_ui\ViewAddFormController", + * "preview" = "Drupal\views_ui\ViewPreviewFormController", + * "clone" = "Drupal\views_ui\ViewCloneFormController" + * } * }, * config_prefix = "views.view", * fieldable = FALSE,