function VocabularyListBuilder::buildHeader

Same name in other branches
  1. 9 core/modules/taxonomy/src/VocabularyListBuilder.php \Drupal\taxonomy\VocabularyListBuilder::buildHeader()
  2. 10 core/modules/taxonomy/src/VocabularyListBuilder.php \Drupal\taxonomy\VocabularyListBuilder::buildHeader()
  3. 11.x core/modules/taxonomy/src/VocabularyListBuilder.php \Drupal\taxonomy\VocabularyListBuilder::buildHeader()

Overrides DraggableListBuilder::buildHeader

File

core/modules/taxonomy/src/VocabularyListBuilder.php, line 138

Class

VocabularyListBuilder
Defines a class to build a listing of taxonomy vocabulary entities.

Namespace

Drupal\taxonomy

Code

public function buildHeader() {
    $header['label'] = t('Vocabulary name');
    $header['description'] = t('Description');
    if ($this->currentUser
        ->hasPermission('administer vocabularies') && !empty($this->weightKey)) {
        $header['weight'] = t('Weight');
    }
    return $header + parent::buildHeader();
}

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