function IndexTidDepth::title

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::title()
  2. 8.9.x core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::title()
  3. 10 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::title()

Overrides ArgumentPluginBase::title

File

core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php, line 109

Class

IndexTidDepth
Argument handler for taxonomy terms with depth.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

public function title() {
    $term = $this->entityRepository
        ->getCanonical('taxonomy_term', $this->argument);
    if (!empty($term)) {
        return $term->label();
    }
    // @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.