public function PreviewLink::getEntities in Preview Link 2.x
Same name and namespace in other branches
- 2.0.x src/Entity/PreviewLink.php \Drupal\preview_link\Entity\PreviewLink::getEntities()
Get entities this preview link unlocks.
Ideally preview link access is determined via PreviewLinkHost service.
Return value
\Drupal\Core\Entity\EntityInterface[] Associated entities.
Overrides PreviewLinkInterface::getEntities
File
- src/
Entity/ PreviewLink.php, line 88
Class
- PreviewLink
- Defines the node entity class.
Namespace
Drupal\preview_link\EntityCode
public function getEntities() : array {
$entities = $this->entities
->referencedEntities();
assert(Inspector::assertAllObjects($entities, EntityInterface::class));
return $entities;
}