diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 78ba3a0..f3c02ed 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -26,6 +26,8 @@ class EntityType extends Plugin { /** * The name of the entity type class. * + * This is not provided manually, it will be added by the discovery mechanism. + * * @var string */ public $class; @@ -51,7 +53,7 @@ class EntityType extends Plugin { /** * Boolean indicating whether fields can be attached to entities of this type. * - * @var bool + * @var bool (optional) */ public $fieldable = FALSE; @@ -61,7 +63,7 @@ class EntityType extends Plugin { * The persistent cache should usually only be disabled if a higher level * persistent cache is available for the entity type. Defaults to TRUE. * - * @var bool + * @var bool (optional) */ public $field_cache = TRUE; @@ -75,9 +77,9 @@ class EntityType extends Plugin { * class can be used for multiple entity forms when the forms are similar. * Defaults to Drupal\Core\Entity\EntityFormController. * - * @var array + * @var array (optional) */ - public $form_controller_class = 'Drupal\Core\Entity\EntityFormController'; + public $form_controller_class = array('Drupal\Core\Entity\EntityFormController'); /** * The human-readable name of the type. @@ -108,7 +110,7 @@ class EntityType extends Plugin { * \Drupal\Core\Entity\EntityInterface::label() method, which implements this * logic. * - * @var string + * @var string (optional) */ public $label_callback; @@ -154,14 +156,14 @@ class EntityType extends Plugin { * * @todo This is only used by \Drupal\Core\Entity\DatabaseStorageController. * - * @var bool + * @var bool (optional) */ public $static_cache = TRUE; /** * Boolean indicating whether entities of this type have mutlilingual support. * - * @var bool + * @var bool (optional) */ public $translatable = FALSE; @@ -224,28 +226,28 @@ class EntityType extends Plugin { * It can be used to generate UI links and to attach additional router items * to the entity UI in a generic fashion. * - * @var string + * @var string (optional) */ public $menu_base_path; /** * The menu router path to be used to view the entity. * - * @var string + * @var string (optional) */ public $menu_view_path; /** * The menu router path to be used to edit the entity. * - * @var string + * @var string (optional) */ public $menu_edit_path; /** * A string identifying the menu loader in the router path. * - * @var string + * @var string (optional) */ public $menu_path_wildcard; @@ -255,7 +257,7 @@ class EntityType extends Plugin { * skip this entity. The allowed values are respectively "entity_type", * "bundle" or FALSE. * - * @var string|bool + * @var string|bool (optional) */ public $permission_granularity = 'entity_type'; diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php index e8ff98e..fe6886a 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php @@ -7,7 +7,7 @@ namespace Drupal\field\Plugin\Core\Entity; -use Drupal\Component\Annotation\Plugin; +use Drupal\Core\Entity\Annotation\EntityType; use Drupal\Core\Annotation\Translation; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\field\FieldException; @@ -18,7 +18,7 @@ * @todo use 'field' as the id once hook_field_load() and friends * are removed. * - * @Plugin( + * @EntityType( * id = "field_entity", * label = @Translation("Field"), * module = "field", diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php index cfe8eb1..9db2f3d 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php @@ -7,7 +7,7 @@ namespace Drupal\field\Plugin\Core\Entity; -use Drupal\Component\Annotation\Plugin; +use Drupal\Core\Entity\Annotation\EntityType; use Drupal\Core\Annotation\Translation; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\field\FieldException; @@ -15,7 +15,7 @@ /** * Defines the Field instance entity. * - * @Plugin( + * @EntityType( * id = "field_instance", * label = @Translation("Field instance"), * module = "field",