You are here

public function PreviewLink::setEntities in Preview Link 2.0.x

Same name and namespace in other branches
  1. 2.x src/Entity/PreviewLink.php \Drupal\preview_link\Entity\PreviewLink::setEntities()

Set the entity this preview link unlocks.

Return value

\Drupal\preview_link\Entity\PreviewLinkInterface Returns the preview link for chaining.

Overrides PreviewLinkInterface::setEntities

File

src/Entity/PreviewLink.php, line 97

Class

PreviewLink
Defines the node entity class.

Namespace

Drupal\preview_link\Entity

Code

public function setEntities(array $entities) {
  assert(Inspector::assertAllObjects($entities, EntityInterface::class));
  $this->entities = $entities;
  return $this;
}