function VocabularyVid::title

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

Overrides Numeric::title

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/VocabularyVid.php, line 25
Definition of 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 = entity_load('taxonomy_vocabulary', $this->argument);
  if ($vocabulary) {
    return check_plain($vocabulary
      ->label());
  }
  return t('No vocabulary');
}