You are here

public function VocabularyListBuilder::render in Taxonomy access fix 8.3

Same name and namespace in other branches
  1. 8 src/VocabularyListBuilder.php \Drupal\taxonomy_access_fix\VocabularyListBuilder::render()
  2. 8.2 src/VocabularyListBuilder.php \Drupal\taxonomy_access_fix\VocabularyListBuilder::render()

Builds the entity listing as renderable array for table.html.twig.

@todo Add a link to add a new item to the #empty text.

Overrides VocabularyListBuilder::render

File

src/VocabularyListBuilder.php, line 29

Class

VocabularyListBuilder
Builds administrative lists of Taxonomy Vocabulary entities.

Namespace

Drupal\taxonomy_access_fix

Code

public function render() {

  // Remove vocabulary sorting for non-admins.
  if (!$this->currentUser
    ->hasPermission('administer taxonomy')) {
    unset($this->weightKey);
  }
  return parent::render();
}