private function PageContext::setNodeData in Acquia Lift Connector 8.4
Same name and namespace in other branches
- 8 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::setNodeData()
- 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
Namespace
Drupal\acquia_lift\Service\ContextCode
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';
}