You are here

public function PreviewLinkStorage::getPreviewLinkForEntity in Preview Link 8

Gets the preview link for a given entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity we want the preview link for.

Return value

\Drupal\preview_link\Entity\PreviewLinkInterface|false The preview link entity if it exists otherwise FALSE.

Overrides PreviewLinkStorageInterface::getPreviewLinkForEntity

File

src/PreviewLinkStorage.php, line 83

Class

PreviewLinkStorage
Preview Link entity storage.

Namespace

Drupal\preview_link

Code

public function getPreviewLinkForEntity(ContentEntityInterface $entity) {
  return $this
    ->getPreviewLink($entity);
}