private function PageContext::setFields in Acquia Lift Connector 8
Same name and namespace in other branches
- 8.4 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::setFields()
- 8.3 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::setFields()
Set fields.
Parameters
\Drupal\Core\Entity\EntityInterface $node: Node.
1 call to PageContext::setFields()
- PageContext::setByNode in src/
Service/ Context/ PageContext.php - Set page context by node.
File
- src/
Service/ Context/ PageContext.php, line 155 - Contains \Drupal\acquia_lift\Service\Context\PageContext.
Class
Namespace
Drupal\acquia_lift\Service\ContextCode
private function setFields(EntityInterface $node) {
$available_field_vocabulary_names = $this
->getAvailableFieldVocabularyNames($node);
$vocabulary_term_names = $this
->getVocabularyTermNames($node);
// Find Field Term names.
foreach ($available_field_vocabulary_names as $page_context_name => $vocabulary_names) {
$field_term_names = $this
->getFieldTermNames($vocabulary_names, $vocabulary_term_names);
$this->pageContext[$page_context_name] = implode(',', $field_term_names);
}
}