public function PreviewLink::getUrl in Preview Link 8
Same name and namespace in other branches
- 2.x src/Entity/PreviewLink.php \Drupal\preview_link\Entity\PreviewLink::getUrl()
- 2.0.x src/Entity/PreviewLink.php \Drupal\preview_link\Entity\PreviewLink::getUrl()
The URL for this preview link.
Return value
\Drupal\Core\Url The url object.
Overrides PreviewLinkInterface::getUrl
File
- src/
Entity/ PreviewLink.php, line 43
Class
- PreviewLink
- Defines the node entity class.
Namespace
Drupal\preview_link\EntityCode
public function getUrl() {
$entity_type_id = $this->entity_type_id->value;
return Url::fromRoute("entity.{$entity_type_id}.preview_link", [
$entity_type_id => $this->entity_id->value,
'preview_token' => $this
->getToken(),
]);
}