You are here

public function IndexTid::titleQuery in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Plugin/views/argument/IndexTid.php \Drupal\taxonomy\Plugin\views\argument\IndexTid::titleQuery()

Override for specific title lookups.

Overrides ManyToOne::titleQuery

File

core/modules/taxonomy/src/Plugin/views/argument/IndexTid.php, line 22
Contains \Drupal\taxonomy\Plugin\views\argument\IndexTid.

Class

IndexTid
Allow taxonomy term ID(s) as argument.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

public function titleQuery() {
  $titles = array();
  $terms = Term::loadMultiple($this->value);
  foreach ($terms as $term) {
    $titles[] = \Drupal::entityManager()
      ->getTranslationFromContext($term)
      ->label();
  }
  return $titles;
}