You are here

public function PreviewLinkRerouteException::getEntity in Preview Link 2.x

Same name and namespace in other branches
  1. 2.0.x src/Exception/PreviewLinkRerouteException.php \Drupal\preview_link\Exception\PreviewLinkRerouteException::getEntity()

Get the entity redirecting to preview link.

Return value

\Drupal\Core\Entity\EntityInterface The entity redirecting to preview link.

File

src/Exception/PreviewLinkRerouteException.php, line 59

Class

PreviewLinkRerouteException
Exception thrown when an entity needs to redirect to a preview link.

Namespace

Drupal\preview_link\Exception

Code

public function getEntity() : EntityInterface {
  return clone $this->entity;
}