3 namespace Drupal\taxonomy\Plugin\views\argument;
5 use Drupal\taxonomy\Entity\Term;
6 use Drupal\views\Plugin\views\argument\ManyToOne;
9 * Allow taxonomy term ID(s) as argument.
11 * @ingroup views_argument_handlers
13 * @ViewsArgument("taxonomy_index_tid")
15 class IndexTid extends ManyToOne {
17 public function titleQuery() {
19 $terms = Term::loadMultiple($this->value);
20 foreach ($terms as $term) {
21 $titles[] = \Drupal::entityManager()->getTranslationFromContext($term)->label();