function EntityTestExternal::toUrl
Same name in other branches
- 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php \Drupal\entity_test\Entity\EntityTestExternal::toUrl()
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php \Drupal\entity_test\Entity\EntityTestExternal::toUrl()
- 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php \Drupal\entity_test\Entity\EntityTestExternal::toUrl()
Overrides EntityBase::toUrl
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestExternal.php, line 29
Class
- EntityTestExternal
- Test entity class.
Namespace
Drupal\entity_test\EntityCode
public function toUrl($rel = 'canonical', array $options = []) {
if ($rel === 'canonical') {
return Url::fromUri('http://example.com', $options);
}
return parent::toUrl($rel, $options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.