You are here

private function PageContext::setNodeData in Acquia Lift Connector 8.4

Same name and namespace in other branches
  1. 8 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::setNodeData()
  2. 8.3 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::setNodeData()

Set Node data.

Parameters

\Drupal\node\NodeInterface $node: Node.

1 call to PageContext::setNodeData()
PageContext::setContextByNode in src/Service/Context/PageContext.php
Set page context by Node.

File

src/Service/Context/PageContext.php, line 256

Class

PageContext

Namespace

Drupal\acquia_lift\Service\Context

Code

private function setNodeData(NodeInterface $node) {
  $this->htmlHeadContexts['content_type'] = $node
    ->getType();
  $this->htmlHeadContexts['content_title'] = $node
    ->getTitle();
  $this->htmlHeadContexts['published_date'] = $node
    ->getCreatedTime();
  $this->htmlHeadContexts['post_id'] = $node
    ->id();
  $this->htmlHeadContexts['content_uuid'] = $node
    ->uuid();
  $this->htmlHeadContexts['page_type'] = 'node page';
}