public function VocabularyListController::getOperations

Overrides \Drupal\Core\Entity\EntityListController::getOperations();

Overrides ConfigEntityListController::getOperations

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php, line 29
Contains \Drupal\taxonomy\VocabularyListController.

Class

VocabularyListController
Provides a listing of vocabularies.

Namespace

Drupal\taxonomy

Code

public function getOperations(EntityInterface $entity) {
  $operations = parent::getOperations($entity);
  $uri = $entity
    ->uri();
  $operations['edit']['title'] = t('edit vocabulary');
  $operations['list'] = array(
    'title' => t('list terms'),
    'href' => $uri['path'],
    'options' => $uri['options'],
    'weight' => 0,
  );
  $operations['add'] = array(
    'title' => t('add terms'),
    'href' => $uri['path'] . '/add',
    'options' => $uri['options'],
    'weight' => 30,
  );
  unset($operations['delete']);
  return $operations;
}