You are here

public function VocabularyListBuilder::buildHeader in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/src/VocabularyListBuilder.php \Drupal\taxonomy\VocabularyListBuilder::buildHeader()
  2. 9 core/modules/taxonomy/src/VocabularyListBuilder.php \Drupal\taxonomy\VocabularyListBuilder::buildHeader()

Builds the header row for the entity listing.

Return value

array A render array structure of header strings.

Overrides DraggableListBuilder::buildHeader

See also

\Drupal\Core\Entity\EntityListBuilder::render()

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