function VocabularyVid::title

Same name in other branches
  1. 8.9.x 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 57

Class

VocabularyVid
Argument handler to accept a vocabulary id.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.