You are here

function Taxonomy::title in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 53
Contains \Drupal\taxonomy\Plugin\views\argument\Taxonomy.

Class

Taxonomy
Argument handler for basic taxonomy tid.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

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