public function PreviewLinkHostInterface::isToken in Preview Link 2.x
Same name and namespace in other branches
- 2.0.x src/PreviewLinkHostInterface.php \Drupal\preview_link\PreviewLinkHostInterface::isToken()
Determines if a token unlocks an entity entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: An entity.
string[] $tokens: An array of Preview Link tokens.
Return value
bool Whether if at least one provided token grants access to the entity.
1 method overrides PreviewLinkHostInterface::isToken()
- PreviewLinkHost::isToken in src/
PreviewLinkHost.php - Determines if a token unlocks an entity entity.
File
- src/
PreviewLinkHostInterface.php, line 36
Class
- PreviewLinkHostInterface
- Interface for relationships between preview links and entities they unlock.
Namespace
Drupal\preview_linkCode
public function isToken(EntityInterface $entity, array $tokens) : bool;