function Taxonomy::title
Same name in other branches
- 8.9.x core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php \Drupal\taxonomy\Plugin\views\argument\Taxonomy::title()
Override the behavior of title(). Get the title of the node.
Overrides NumericArgument::title
File
-
core/
modules/ taxonomy/ src/ Plugin/ views/ argument/ Taxonomy.php, line 48
Class
- Taxonomy
- Argument handler for basic taxonomy tid.
Namespace
Drupal\taxonomy\Plugin\views\argumentCode
public function title() {
// There might be no valid argument.
if ($this->argument) {
$term = $this->termStorage
->load($this->argument);
if (!empty($term)) {
return $term->getName();
}
}
// TODO review text
return $this->t('No name');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.