function FieldRdfaTestBase::getAbsoluteUri
Same name and namespace in other branches
- 8.9.x core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php \Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase::getAbsoluteUri()
Gets the absolute URI of an entity.
Parameters
\Drupal\Core\Entity\ContentEntityBase $entity: The entity for which to generate the URI.
Return value
string The absolute URI.
File
-
core/
modules/ rdf/ tests/ src/ Kernel/ Field/ FieldRdfaTestBase.php, line 125
Class
Namespace
Drupal\Tests\rdf\Kernel\FieldCode
protected function getAbsoluteUri($entity) {
return $entity->toUrl('canonical', [
'absolute' => TRUE,
])
->toString();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.