You are here

public function VocabularyListBuilder::render in Taxonomy access fix 8

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

Override Drupal\taxonomy\VocabularyListBuilder::render().

Overrides VocabularyListBuilder::render

File

src/VocabularyListBuilder.php, line 30

Class

VocabularyListBuilder

Namespace

Drupal\taxonomy_access_fix

Code

public function render() {

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