diff --git a/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php b/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php new file mode 100644 index 0000000..06021f1 --- /dev/null +++ b/core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php @@ -0,0 +1,29 @@ + 'Drupal\Core\Entity\EntityAccessController', + 'storage' => 'Drupal\Core\Config\Entity\ConfigStorageController' + ); + + + public $group = 'Configuration'; + +} diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index e0580e2..9ecca87 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -33,6 +33,15 @@ class EntityType extends Plugin { public $class; /** + * Group this entity type belongs to, commonly either Configuration or Content. + * + * @ingroup plugin_translatable + * + * @var \Drupal\Core\Annotation\Translation + */ + public $group; + + /** * The name of the entity type's base table. * * @todo This is only used by \Drupal\Core\Entity\DatabaseStorageController. diff --git a/core/modules/node/lib/Drupal/node/Entity/NodeType.php b/core/modules/node/lib/Drupal/node/Entity/NodeType.php index 5bc423e..7297a80 100644 --- a/core/modules/node/lib/Drupal/node/Entity/NodeType.php +++ b/core/modules/node/lib/Drupal/node/Entity/NodeType.php @@ -10,18 +10,15 @@ use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\node\NodeTypeInterface; -use Drupal\Core\Entity\Annotation\EntityType; -use Drupal\Core\Annotation\Translation; /** * Defines the Node type configuration entity. * - * @EntityType( + * @ConfigEntityType( * id = "node_type", * label = @Translation("Content type"), * module = "node", * controllers = { - * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\node\NodeTypeAccessController", * "form" = { * "add" = "Drupal\node\NodeTypeFormController",