diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 149b727..d4fac1e 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -249,29 +249,29 @@ class EntityType extends Plugin { * Link templates using the URI template syntax. * * Links are an array of standard link relations to the URI template that - * should be used for them. Where possible, link relationships should use + * should be used for them. Where possible, link relationships should use * established IANA relationships rather than custom relationships. * * Every entity type should, at minimum, define "canonical", which is the - * pattern for URIs to that entity. Even if the entity will have no HTML - * page exposed to users it should still have a canonical URI in order to - * be compatible with web services. Entities that will be user-editable - * via an HTML page must also define an "edit-form" relationship. + * pattern for URIs to that entity. Even if the entity will have no HTML page + * exposed to users it should still have a canonical URI in order to be + * compatible with web services. Entities that will be user-editable via an + * HTML page must also define an "edit-form" relationship. * * By default, the following placeholders are supported: - * - entityType: The machine name of the entity. - * - bundle: The bundle machine name of the entity. - * - id: The unique ID of the entity. - * - uuid: The UUID of the entity. - * - [entityType]: The entity type itself will also be a valid token for - * the ID of the entity. This is generally preferred over - * "id" for better self-documentation. + * - entityType: The machine name of the entity. + * - bundle: The bundle machine name of the entity. + * - id: The unique ID of the entity. + * - uuid: The UUID of the entity. + * - [entityType]: The entity type itself will also be a valid token for the + * ID of the entity. This is generally preferred over "id" for better + * self-documentation. * * Specific entity types may also expand upon this list by overriding the * uriPlaceholderReplacements() method. * - * @link http://www.iana.org/assignments/link-relations/link-relations.xml - * @link http://tools.ietf.org/html/rfc6570 + * @link http://www.iana.org/assignments/link-relations/link-relations.xml @endlink + * @link http://tools.ietf.org/html/rfc6570 @endlink * * @var array */ @@ -288,4 +288,5 @@ class EntityType extends Plugin { * @var string|bool (optional) */ public $permission_granularity = 'entity_type'; + } diff --git a/core/lib/Drupal/Core/Entity/EntityNG.php b/core/lib/Drupal/Core/Entity/EntityNG.php index 8f9d5cd..1d740ad 100644 --- a/core/lib/Drupal/Core/Entity/EntityNG.php +++ b/core/lib/Drupal/Core/Entity/EntityNG.php @@ -74,7 +74,7 @@ class EntityNG extends Entity { protected $fieldDefinitions; /** - * Local cache for uri placeholder substitution values. + * Local cache for URI placeholder substitution values. * * @var array */ @@ -143,7 +143,7 @@ public function uuid() { } /** - * Implements \Drupal\Core\Entity\EntityInterface::uri(). + * {@inheritdoc} */ public function uri($rel = 'canonical') { $entity_info = $this->entityInfo(); @@ -156,7 +156,7 @@ public function uri($rel = 'canonical') { $uri['path'] = str_replace(array_keys($replacements), array_values($replacements), $template); // @todo Remove this once http://drupal.org/node/1888424 is in and we can - // move the BC handling of / vs. no-/ to the generator. + // move the BC handling of / vs. no-/ to the generator. $uri['path'] = trim($uri['path'], '/'); // Pass the entity data to url() so that alter functions do not need to @@ -166,15 +166,16 @@ public function uri($rel = 'canonical') { return $uri; } - // For a canonical link (ie, link to self), look up the stack for default - // logic. Other relationship types are not supported by parent classes. + // For a canonical link (that is, a link to self), look up the stack for + // default logic. Other relationship types are not supported by parent + // classes. if ($rel == 'canonical') { return parent::uri(); } } /** - * Returns a list of uri relationships supported by this entity. + * Returns a list of URI relationships supported by this entity. * * @return array * An array of link relationships supported by this entity. @@ -188,10 +189,11 @@ public function uriRelationships() { * Returns an array of placeholders for this entity. * * Individual entity classes may override this method to add additional - * placeholders if desired. If so, they should be sure to replicate the + * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @return array + * An array of URI placeholders. */ protected function uriPlaceholderReplacements() { if (empty($this->uriPlaceholderReplacements)) {