You are here

public function PageContext::setByNode in Acquia Lift Connector 8

Set page context by node.

Parameters

\Drupal\Core\Entity\EntityInterface $node: Node.

File

src/Service/Context/PageContext.php, line 84
Contains \Drupal\acquia_lift\Service\Context\PageContext.

Class

PageContext

Namespace

Drupal\acquia_lift\Service\Context

Code

public function setByNode(EntityInterface $node) {
  $this
    ->setNodeData($node);
  $this
    ->setThumbnailUrl($node);
  $this
    ->setFields($node);
}