Commit bc3a902f authored by alexpott's avatar alexpott

Issue #1807042 by tim.plunkett, effulgentsia: Rename entity...

Issue #1807042 by tim.plunkett, effulgentsia: Rename entity storage/list/form/render controllers to handlers, part 1: organize existing annotation keys.
parent 91fc0d3e
......@@ -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';
}
/**
......@@ -216,7 +216,7 @@ function hook_entity_bundle_delete($entity_type, $bundle) {
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';
}
/**
......
......@@ -250,8 +250,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
......
......@@ -42,13 +42,37 @@ class EntityType extends Plugin {
public $base_table;
/**
* The name of the class that is used to load the objects.
* 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.
* - 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 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. The classes must implement
* \Drupal\Core\Entity\EntityFormControllerInterface
* - list: The name of the class that provides listings of the entities. The
* class must implement \Drupal\Core\Entity\EntityListControllerInterface.
* - render: The name of the class that is used to render the entities. The
* class must implement \Drupal\Core\Entity\EntityRenderControllerInterface.
* - 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: The name of the controller class that should be used to
* handle the translation process. The class must implement
* \Drupal\translation_entity\EntityTranslationControllerInterface.
*
* This must implement \Drupal\Core\Entity\EntityStorageControllerInterface.
* @todo Interfaces from outside \Drupal\Core or \Drupal\Component should not
* be used here.
*
* @var string
* @var array
*/
public $controller_class = 'Drupal\Core\Entity\DatabaseStorageController';
public $controllers = array(
'access' => 'Drupal\Core\Entity\EntityAccessController',
);
/**
* Boolean indicating whether fields can be attached to entities of this type.
......@@ -67,20 +91,6 @@ class EntityType extends Plugin {
*/
public $field_cache = TRUE;
/**
* The names of classes for various form operations.
*
* 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.
*
* @var array (optional)
*/
public $form_controller_class = array('Drupal\Core\Entity\EntityFormController');
/**
* The human-readable name of the type.
*
......@@ -114,43 +124,6 @@ class EntityType extends Plugin {
*/
public $label_callback;
/**
* The name of the class that provides listings of the entities.
*
* The class must implement \Drupal\Core\Entity\EntityListControllerInterface.
*
* @var string
*/
public $list_controller_class = 'Drupal\Core\Entity\EntityListController';
/**
* The name of the class that is used to render the entities.
*
* @var string
*/
public $render_controller_class;
/**
* The name of the class that is used for access checks.
*
* The class must implement \Drupal\Core\Entity\EntityAccessControllerInterface.
*
* @var string
*/
public $access_controller_class = 'Drupal\Core\Entity\EntityAccessController';
/**
* The name of the translation controller class that should be used to handle the translation process.
*
* The class must implement \Drupal\translation_entity\EntityTranslationControllerInterface.
*
* @todo Interfaces from outside \Drupal\Core or \Drupal\Component should not
* be used here.
*
* @var string
*/
public $translation_controller_class;
/**
* Boolean indicating whether entities should be statically cached during a page request.
*
......
......@@ -70,7 +70,7 @@ public function __construct(array $namespaces) {
*/
public function hasController($entity_type, $controller_type) {
$definition = $this->getDefinition($entity_type);
return !empty($definition[$controller_type]);
return !empty($definition['controllers'][$controller_type]);
}
/**
......@@ -89,6 +89,7 @@ public function hasController($entity_type, $controller_type) {
*/
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));
}
......@@ -122,7 +123,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];
......@@ -139,7 +140,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];
......@@ -158,7 +159,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];
......@@ -175,7 +176,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];
......@@ -192,7 +193,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];
......
......@@ -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.
*
......
......@@ -19,10 +19,12 @@
* id = "aggregator_feed",
* label = @Translation("Aggregator feed"),
* module = "aggregator",
* controller_class = "Drupal\aggregator\FeedStorageController",
* render_controller_class = "Drupal\aggregator\FeedRenderController",
* form_controller_class = {
* "default" = "Drupal\aggregator\FeedFormController"
* controllers = {
* "storage" = "Drupal\aggregator\FeedStorageController",
* "render" = "Drupal\aggregator\FeedRenderController",
* "form" = {
* "default" = "Drupal\aggregator\FeedFormController"
* }
* },
* base_table = "aggregator_feed",
* fieldable = TRUE,
......
......@@ -19,8 +19,10 @@
* id = "aggregator_item",
* label = @Translation("Aggregator feed item"),
* module = "aggregator",
* controller_class = "Drupal\aggregator\ItemStorageController",
* render_controller_class = "Drupal\aggregator\ItemRenderController",
* controllers = {
* "storage" = "Drupal\aggregator\ItemStorageController",
* "render" = "Drupal\aggregator\ItemRenderController"
* },
* base_table = "aggregator_item",
* fieldable = TRUE,
* entity_keys = {
......
......@@ -20,13 +20,15 @@
* label = @Translation("Custom Block"),
* bundle_label = @Translation("Custom Block type"),
* module = "custom_block",
* controller_class = "Drupal\custom_block\CustomBlockStorageController",
* access_controller_class = "Drupal\custom_block\CustomBlockAccessController",
* render_controller_class = "Drupal\custom_block\CustomBlockRenderController",
* form_controller_class = {
* "default" = "Drupal\custom_block\CustomBlockFormController"
* controllers = {
* "storage" = "Drupal\custom_block\CustomBlockStorageController",
* "access" = "Drupal\custom_block\CustomBlockAccessController",
* "render" = "Drupal\custom_block\CustomBlockRenderController",
* "form" = {
* "default" = "Drupal\custom_block\CustomBlockFormController"
* },
* "translation" = "Drupal\custom_block\CustomBlockTranslationController"
* },
* translation_controller_class = "Drupal\custom_block\CustomBlockTranslationController",
* base_table = "custom_block",
* revision_table = "custom_block_revision",
* menu_base_path = "block/%custom_block",
......
......@@ -18,10 +18,12 @@
* id = "custom_block_type",
* label = @Translation("Custom block type"),
* module = "custom_block",
* controller_class = "Drupal\custom_block\CustomBlockTypeStorageController",
* list_controller_class = "Drupal\custom_block\CustomBlockTypeListController",
* form_controller_class = {
* "default" = "Drupal\custom_block\CustomBlockTypeFormController"
* controllers = {
* "storage" = "Drupal\custom_block\CustomBlockTypeStorageController",
* "form" = {
* "default" = "Drupal\custom_block\CustomBlockTypeFormController"
* },
* "list" = "Drupal\custom_block\CustomBlockTypeListController"
* },
* config_prefix = "custom_block.type",
* entity_keys = {
......
......@@ -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,
......
......@@ -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",
......
......@@ -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",
......
......@@ -20,13 +20,15 @@
* label = @Translation("Comment"),
* bundle_label = @Translation("Content type"),
* module = "comment",
* controller_class = "Drupal\comment\CommentStorageController",
* access_controller_class = "Drupal\comment\CommentAccessController",
* render_controller_class = "Drupal\comment\CommentRenderController",
* form_controller_class = {
* "default" = "Drupal\comment\CommentFormController"
* controllers = {
* "storage" = "Drupal\comment\CommentStorageController",
* "access" = "Drupal\comment\CommentAccessController",
* "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,
......
......@@ -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",
......
......@@ -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",
......
......@@ -18,7 +18,9 @@
* id = "config_test_empty_manifest",
* label = @Translation("Test empty manifest creation"),
* module = "config_test",
* controller_class = "Drupal\config_test\ConfigTestStorageController",
* controllers = {
* "storage" = "Drupal\config_test\ConfigTestStorageController"
* },
* config_prefix = "config_test.empty_manifest",
* entity_keys = {
* "id" = "id",
......
......@@ -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",
......
......@@ -18,10 +18,13 @@
* id = "contact_message",
* label = @Translation("Contact message"),
* module = "contact",
* form_controller_class = {
* "default" = "Drupal\contact\MessageFormController"
* controllers = {
* "storage" = "Drupal\Core\Entity\DatabaseStorageController",
* "render" = "Drupal\contact\MessageRenderController",
* "form" = {
* "default" = "Drupal\contact\MessageFormController"
* }
* },
* render_controller_class = "Drupal\contact\MessageRenderController",
* entity_keys = {
* "bundle" = "category"
* },
......
......@@ -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",
......
......@@ -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",
......
......@@ -22,7 +22,9 @@
* id = "field_entity",
* label = @Translation("Field"),
* module = "field",
* controller_class = "Drupal\Core\Config\Entity\ConfigStorageController",
* controllers = {
* "storage" = "Drupal\Core\Config\Entity\ConfigStorageController"
* },
* config_prefix = "field.field",
* entity_keys = {
* "id" = "id",
......
......@@ -19,7 +19,9 @@
* id = "field_instance",
* label = @Translation("Field instance"),
* module = "field",
* controller_class = "Drupal\field\FieldInstanceStorageController",
* controllers = {
* "storage" = "Drupal\field\FieldInstanceStorageController"
* },
* config_prefix = "field.instance",
* entity_keys = {
* "id" = "id",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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 = {
......
......@@ -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",
......
......@@ -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",
......
......@@ -146,9 +146,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',
);
}
......
......@@ -21,10 +21,12 @@
* id = "menu_link",
* label = @Translation("Menu link"),
* module = "menu_link",
* controller_class = "Drupal\menu_link\MenuLinkStorageController",
* render_controller_class = "Drupal\Core\Entity\EntityRenderController",
* form_controller_class = {
* "default" = "Drupal\menu_link\MenuLinkFormController"
* controllers = {
* "storage" = "Drupal\menu_link\MenuLinkStorageController",
* "render" = "Drupal\Core\Entity\EntityRenderController",
* "form" = {
* "default" = "Drupal\menu_link\MenuLinkFormController"
* }
* },
* static_cache = FALSE,
* base_table = "menu_links",
......
......@@ -20,13 +20,15 @@
* label = @Translation("Content"),
* bundle_label = @Translation("Content type"),
* module = "node",
* controller_class = "Drupal\node\NodeStorageController",
* render_controller_class = "Drupal\node\NodeRenderController",
* access_controller_class = "Drupal\node\NodeAccessController",
* form_controller_class = {
* "default" = "Drupal\node\NodeFormController"
* controllers = {
* "storage" = "Drupal\node\NodeStorageController",
* "render" = "Drupal\node\NodeRenderController",
* "access" = "Drupal\node\NodeAccessController",
* "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",
......
......@@ -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",
......
......@@ -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"