You are here

function VocabularyVid::title in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php \Drupal\taxonomy\Plugin\views\argument\VocabularyVid::title()

Override the behavior of title(). Get the name of the vocabulary.

Overrides NumericArgument::title

File

core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php, line 62
Contains \Drupal\taxonomy\Plugin\views\argument\VocabularyVid.

Class

VocabularyVid
Argument handler to accept a vocabulary id.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

function title() {
  $vocabulary = $this->vocabularyStorage
    ->load($this->argument);
  if ($vocabulary) {
    return $vocabulary
      ->label();
  }
  return $this
    ->t('No vocabulary');
}