You are here

public function VocabularyListBuilder::getOperations in Taxonomy access fix 8

Override Drupal\Core\Entity\EntityListBuilder::getOperations().

Overrides EntityListBuilder::getOperations

File

src/VocabularyListBuilder.php, line 42

Class

VocabularyListBuilder

Namespace

Drupal\taxonomy_access_fix

Code

public function getOperations(EntityInterface $entity) {
  $operations = parent::getOperations($entity);
  if (!taxonomy_access_fix_access('add terms', $entity)) {
    unset($operations['add']);
  }
  return $operations;
}