class PreviewLinkUtility in Preview Link 2.0.x
Same name and namespace in other branches
- 2.x src/PreviewLinkUtility.php \Drupal\preview_link\PreviewLinkUtility
Preview link utility.
Hierarchy
- class \Drupal\preview_link\PreviewLinkUtility
Expanded class hierarchy of PreviewLinkUtility
2 files declare their use of PreviewLinkUtility
- PreviewLinkRoutes.php in src/
Routing/ PreviewLinkRoutes.php - preview_link.module in ./
preview_link.module - Module file.
File
- src/
PreviewLinkUtility.php, line 12
Namespace
Drupal\preview_linkView source
class PreviewLinkUtility {
/**
* Determines if an entity type is supported by Preview Link.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entityType
* An entity type.
*
* @return bool
* Whether an entity type is supported by Preview Link.
*/
public static function isEntityTypeSupported(EntityTypeInterface $entityType) : bool {
return $entityType
->isRevisionable() && $entityType
->hasLinkTemplate('canonical');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PreviewLinkUtility:: |
public static | function | Determines if an entity type is supported by Preview Link. |