You are here

function IndexTidDepth::title in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::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

core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php, line 138
Contains \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth.

Class

IndexTidDepth
Argument handler for taxonomy terms with depth.

Namespace

Drupal\taxonomy\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');
}