diff --git a/core/lib/Drupal/Component/Annotation/AnnotationInterface.php b/core/lib/Drupal/Component/Annotation/AnnotationInterface.php index 6e577c2..a0dd75d 100644 --- a/core/lib/Drupal/Component/Annotation/AnnotationInterface.php +++ b/core/lib/Drupal/Component/Annotation/AnnotationInterface.php @@ -18,35 +18,35 @@ public function get(); /** - * @todo. + * Returns the name of the provider of the plugin. * * @return string */ public function getProvider(); /** - * @todo. + * Sets the name of the provider of the plugin. * * @param string $provider */ public function setProvider($provider); /** - * @todo. + * Returns the unique ID for this plugin. * * @return string */ public function getId(); /** - * @todo. + * Returns the class of the plugin. * * @return string */ public function getClass(); /** - * @todo. + * Sets the class of the plugin. * * @param string $class */ diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 2a3639e..37d81b8 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -18,7 +18,8 @@ class EntityType extends Plugin { /** - * @todo content_translation_entity_info_alter() uses this but it is undocumented. + * @todo content_translation_entity_info_alter() uses this but it is + * undocumented. Fix in https://drupal.org/node/1968970. * * @var array */ diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 228492e..50b831d 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -491,4 +491,18 @@ public function getTranslationFromContext(EntityInterface $entity, $langcode = N return $translation; } + /** + * {@inheritdoc} + */ + public function getDefinition($entity_type_name) { + return parent::getDefinition($entity_type_name); + } + + /** + * {@inheritdoc} + */ + public function getDefinitions() { + return parent::getDefinitions(); + } + } diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php index 6597326..cb962e0 100644 --- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php @@ -263,14 +263,21 @@ public function getBundleInfo($entity_type); public function getTranslationFromContext(EntityInterface $entity, $langcode = NULL, $context = array()); /** - * {@inheritdoc} + * Returns the entity type info for a specific entity type. + * + * @param string $entity_type_name + * The name of the entity type. * * @return \Drupal\Core\Entity\EntityTypeInterface|null + * Either the entity type object, or NULL if the name does not exist. */ - public function getDefinition($plugin_id); + public function getDefinition($entity_type_name); /** + * Returns an array of entity type info, keyed by entity type name. + * * @return \Drupal\Core\Entity\EntityTypeInterface[] + * An array of entity type objects. */ public function getDefinitions(); diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 47e0780..d6c50eb 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -10,7 +10,7 @@ use Drupal\Component\Utility\Unicode; /** - * @todo. + * Provides an implementation of an entity type and its metadata. */ class EntityType implements EntityTypeInterface { @@ -43,14 +43,14 @@ class EntityType implements EntityTypeInterface { protected $entity_keys = array(); /** - * @todo. + * The unique identifier of this entity type. * * @var string */ protected $id; /** - * @todo. + * The name of the provider of this entity type. * * @var string */ @@ -145,28 +145,26 @@ class EntityType implements EntityTypeInterface { /** * The name of the entity type's base table. * - * @todo This is only used by \Drupal\Core\Entity\DatabaseStorageController. - * * @var string */ protected $base_table; /** - * @todo. + * The name of the entity type's revision data table. * * @var string */ protected $revision_data_table; /** - * @todo. + * The name of the entity type's revision table. * * @var string */ protected $revision_table; /** - * @todo. + * The name of the entity type's data table. * * @var string */ @@ -180,7 +178,7 @@ class EntityType implements EntityTypeInterface { protected $translatable = FALSE; /** - * @todo. + * Returns the config prefix used by the configuration entity type. * * @var string */ @@ -194,7 +192,7 @@ class EntityType implements EntityTypeInterface { protected $label; /** - * @todo. + * A callable that can be used to provide the entity URI. * * @var callable */ diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index 4d4c7b7..18405f5 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Entity; /** - * @todo. + * Provides an interface for an entity type and its metadata. */ interface EntityTypeInterface { @@ -47,18 +47,18 @@ public function set($key, $value); public function hasKey($key); /** - * @todo. + * Returns the unique identifier of the entity type. * * @return string - * @todo. + * The unique identifier of the entity type. */ public function getId(); /** - * @todo. + * Returns the name of the provider of this entity type. * * @return string - * @todo. + * The name of the provider of this entity type. */ public function getProvider(); @@ -101,6 +101,8 @@ public function isRenderCacheable(); /** * Indicates if the persistent cache of field data should be used. * + * @todo Used by FieldableEntityStorageControllerBase only. + * * The persistent cache should usually only be disabled if a higher level * persistent cache is available for the entity type. * @@ -432,6 +434,8 @@ public function getBundleLabel(); /** * Returns the name of the entity's base table. * + * @todo Used by DatabaseStorageController only. + * * @return string|bool * The name of the entity's base table, or FALSE if none exists. */ @@ -448,66 +452,77 @@ public function getBaseTable(); public function isTranslatable(); /** - * @todo. + * Returns the config prefix used by the configuration entity type. + * + * @todo Used for configuration entities only. * * @return string|bool - * @todo. + * The config prefix, or FALSE if not a configuration entity type. */ public function getConfigPrefix(); /** - * @todo. + * Returns the name of the entity's revision data table. + * + * @todo Used by FieldableDatabaseStorageController only. * * @return string|bool - * @todo. + * The name of the entity type's revision data table. */ public function getRevisionDataTable(); /** - * @todo. + * Returns the name of the entity's revision table. + * + * @todo Used by FieldableDatabaseStorageController only. * * @return string|bool - * @todo. + * The name of the entity type's revision table. */ public function getRevisionTable(); /** - * @todo. + * Returns the name of the entity's data table. + * + * @todo Used by FieldableDatabaseStorageController only. * * @return string|bool - * @todo. + * The name of the entity type's data table. */ public function getDataTable(); /** - * @todo. + * Returns the human-readable name of the entity type. * * @return string - * @todo. + * The human-readable name of the entity type. */ public function getLabel(); /** - * @todo. + * Returns the lowercase form of the human-readable entity type name. * * @return string - * @todo. + * The lowercase form of the human-readable entity type name. */ public function getLowercaseLabel(); /** - * @todo. + * Returns a callable that can be used to provide the entity URI. + * + * This is only called if there is no matching link template for the link + * relationship type, and there is no bundle-specific callback provided. * * @return callable|bool - * @todo. + * A valid callback that is passed the entity or FALSE if none is specified. */ public function getUriCallback(); /** - * @todo. + * Sets a callable to use to provide the entity URI. * * @param callable $callback - * @todo. + * A callback to use to provide a URI for the entity. * * @return static */