protected function EntityNG::uriPlaceholderReplacements

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 property caching logic.

Return value

array An array of URI placeholders.

1 call to EntityNG::uriPlaceholderReplacements()
EntityNG::uri in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Implements \Drupal\Core\Entity\EntityInterface::uri().

File

drupal/core/lib/Drupal/Core/Entity/EntityNG.php, line 187
Contains \Drupal\Core\Entity\EntityNG.

Class

EntityNG
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

protected function uriPlaceholderReplacements() {
  if (empty($this->uriPlaceholderReplacements)) {
    $this->uriPlaceholderReplacements = array(
      '{entityType}' => $this
        ->entityType(),
      '{bundle}' => $this
        ->bundle(),
      '{id}' => $this
        ->id(),
      '{uuid}' => $this
        ->uuid(),
      '{' . $this
        ->entityType() . '}' => $this
        ->id(),
    );
  }
  return $this->uriPlaceholderReplacements;
}