public function JsonldEntityWrapper::getId

Get the Entity's URI for the @id attribute.

Return value

string The URI of the entity.

File

drupal/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityWrapper.php, line 60
Definition of Drupal\jsonld\JsonldEntityWrapper.

Class

JsonldEntityWrapper
Provide an interface for JsonldNormalizer to get required properties.

Namespace

Drupal\jsonld

Code

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