public function PreviewLink::addEntity in Preview Link 2.0.x
Same name and namespace in other branches
- 2.x src/Entity/PreviewLink.php \Drupal\preview_link\Entity\PreviewLink::addEntity()
Add an entity for this preview link to unlock.
Return value
\Drupal\preview_link\Entity\PreviewLinkInterface Returns the preview link for chaining.
Overrides PreviewLinkInterface::addEntity
File
- src/
Entity/ PreviewLink.php, line 106
Class
- PreviewLink
- Defines the node entity class.
Namespace
Drupal\preview_link\EntityCode
public function addEntity(EntityInterface $entity) {
$this->entities[] = $entity;
return $this;
}