You are here

function IndexNameDepth::title in Views Taxonomy Term Name Depth 8.3

Same name and namespace in other branches
  1. 8.6 src/Plugin/views/argument/IndexNameDepth.php \Drupal\views_taxonomy_term_name_depth\Plugin\views\argument\IndexNameDepth::title()
  2. 8 src/Plugin/views/argument/IndexNameDepth.php \Drupal\views_taxonomy_term_name_depth\Plugin\views\argument\IndexNameDepth::title()
  3. 7.x src/Plugin/views/argument/IndexNameDepth.php \Drupal\views_taxonomy_term_name_depth\Plugin\views\argument\IndexNameDepth::title()

@inheritdoc

Overrides ArgumentPluginBase::title

File

src/Plugin/views/argument/IndexNameDepth.php, line 223

Class

IndexNameDepth
Argument handler for taxonomy terms with depth.

Namespace

Drupal\views_taxonomy_term_name_depth\Plugin\views\argument

Code

function title() {
  $term = $this->termStorage
    ->load($this->argument);
  if (!empty($term)) {
    return $term
      ->getName();
  }

  // TODO review text
  return $this
    ->t('No name');
}