You are here

private function PageContext::getFieldTermNames 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::getFieldTermNames()
  2. 8.3 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::getFieldTermNames()

Get Field's Term names.

Parameters

array $vocabulary_names: Vocabulary names.

array $vocabulary_term_names: Vocabulary Term names.

Return value

array Field Term names.

1 call to PageContext::getFieldTermNames()
PageContext::setFields in src/Service/Context/PageContext.php
Set fields.

File

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

Class

PageContext

Namespace

Drupal\acquia_lift\Service\Context

Code

private function getFieldTermNames($vocabulary_names, $vocabulary_term_names) {
  $field_term_names = [];
  foreach ($vocabulary_names as $vocabulary_name) {
    if (!isset($vocabulary_term_names[$vocabulary_name])) {
      continue;
    }
    $field_term_names = array_merge($field_term_names, $vocabulary_term_names[$vocabulary_name]);
  }
  return array_unique($field_term_names);
}