class IndexTid in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/Plugin/views/argument/IndexTid.php \Drupal\taxonomy\Plugin\views\argument\IndexTid
- 9 core/modules/taxonomy/src/Plugin/views/argument/IndexTid.php \Drupal\taxonomy\Plugin\views\argument\IndexTid
Allow taxonomy term ID(s) as argument.
Plugin annotation
@ViewsArgument("taxonomy_index_tid");
Hierarchy
- class \Drupal\taxonomy\Plugin\views\argument\IndexTid extends \Drupal\views\Plugin\views\argument\ManyToOne
Expanded class hierarchy of IndexTid
File
- core/
modules/ taxonomy/ src/ Plugin/ views/ argument/ IndexTid.php, line 15
Namespace
Drupal\taxonomy\Plugin\views\argumentView source
class IndexTid extends ManyToOne {
public function titleQuery() {
$titles = [];
$terms = Term::loadMultiple($this->value);
foreach ($terms as $term) {
$titles[] = \Drupal::service('entity.repository')
->getTranslationFromContext($term)
->label();
}
return $titles;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
IndexTid:: |
public | function |