function IndexTid::titleQuery
Override for specific title lookups.
Overrides ManyToOne::titleQuery
File
- 
              core/modules/ taxonomy/ src/ Plugin/ views/ argument/ IndexTid.php, line 19 
Class
- IndexTid
- Allow taxonomy term ID(s) as argument.
Namespace
Drupal\taxonomy\Plugin\views\argumentCode
public function titleQuery() {
  $titles = [];
  $terms = Term::loadMultiple($this->value);
  foreach ($terms as $term) {
    $titles[] = \Drupal::service('entity.repository')->getTranslationFromContext($term)
      ->label();
  }
  return $titles;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
