You are here

public function PreviewLinkRerouteException::__construct 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::__construct()

PreviewLinkRerouteException constructor.

Parameters

string $message: The Exception message to throw.

int $code: The Exception code.

\Throwable|null $previous: The previous throwable used for the exception chaining.

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

\Drupal\preview_link\Entity\PreviewLinkInterface $previewLink: The preview link redirecting to.

File

src/Exception/PreviewLinkRerouteException.php, line 47

Class

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

Namespace

Drupal\preview_link\Exception

Code

public function __construct($message, $code, ?\Throwable $previous, EntityInterface $entity, PreviewLinkInterface $previewLink) {
  parent::__construct($message, $code, $previous);
  $this->entity = $entity;
  $this->previewLink = $previewLink;
}