protected function EntityNormalizer::getEntityUri

Constructs the entity URI.

Parameters

$entity: The entity.

Return value

string The entity URI.

1 call to EntityNormalizer::getEntityUri()

File

drupal/core/modules/hal/lib/Drupal/hal/Normalizer/EntityNormalizer.php, line 142
Contains \Drupal\hal\Normalizer\EntityNormalizer.

Class

EntityNormalizer
Converts the Drupal entity object structure to a HAL array structure.

Namespace

Drupal\hal\Normalizer

Code

protected function getEntityUri($entity) {
  $uri_info = $entity
    ->uri();
  return url($uri_info['path'], array(
    'absolute' => TRUE,
  ));
}