function IndexNameDepth::title in Views Taxonomy Term Name Depth 8
Same name and namespace in other branches
- 8.6 src/Plugin/views/argument/IndexNameDepth.php \Drupal\views_taxonomy_term_name_depth\Plugin\views\argument\IndexNameDepth::title()
- 8.3 src/Plugin/views/argument/IndexNameDepth.php \Drupal\views_taxonomy_term_name_depth\Plugin\views\argument\IndexNameDepth::title()
- 7.x src/Plugin/views/argument/IndexNameDepth.php \Drupal\views_taxonomy_term_name_depth\Plugin\views\argument\IndexNameDepth::title()
Get the title this argument will assign the view, given the argument.
This usually needs to be overridden to provide a proper title.
Overrides ArgumentPluginBase::title
File
- src/
Plugin/ views/ argument/ IndexNameDepth.php, line 150
Class
- IndexNameDepth
- Argument handler for taxonomy terms with depth.
Namespace
Drupal\views_taxonomy_term_name_depth\Plugin\views\argumentCode
function title() {
$term = $this->termStorage
->load($this->argument);
if (!empty($term)) {
return $term
->getName();
}
// TODO review text
return $this
->t('No name');
}