You are here

public static function PreviewLinkUtility::isEntityTypeSupported in Preview Link 2.x

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

Determines if an entity type is supported by Preview Link.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entityType: An entity type.

Return value

bool Whether an entity type is supported by Preview Link.

File

src/PreviewLinkUtility.php, line 23

Class

PreviewLinkUtility
Preview link utility.

Namespace

Drupal\preview_link

Code

public static function isEntityTypeSupported(EntityTypeInterface $entityType) : bool {
  return $entityType
    ->isRevisionable() && $entityType
    ->hasLinkTemplate('canonical');
}