public function EntityListController::getOperations

Implements Drupal\Core\Entity\EntityListControllerInterface::getOperations().

Overrides EntityListControllerInterface::getOperations

2 calls to EntityListController::getOperations()
EntityListController::buildOperations in drupal/core/lib/Drupal/Core/Entity/EntityListController.php
Builds a renderable list of operation links for the entity.
PictureMappingListController::getOperations in drupal/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php
Overrides Drupal\config\ConfigEntityListController::getOperations();
2 methods override EntityListController::getOperations()
PictureMappingListController::getOperations in drupal/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php
Overrides Drupal\config\ConfigEntityListController::getOperations();
ViewListController::getOperations in drupal/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php
Implements Drupal\Core\Entity\EntityListController::getOperations();

File

drupal/core/lib/Drupal/Core/Entity/EntityListController.php, line 69
Definition of Drupal\Core\Entity\EntityListController.

Class

EntityListController
Provides a generic implementation of an entity list controller.

Namespace

Drupal\Core\Entity

Code

public function getOperations(EntityInterface $entity) {
  $uri = $entity
    ->uri();
  $operations['edit'] = array(
    'title' => t('Edit'),
    'href' => $uri['path'] . '/edit',
    'options' => $uri['options'],
    'weight' => 10,
  );
  $operations['delete'] = array(
    'title' => t('Delete'),
    'href' => $uri['path'] . '/delete',
    'options' => $uri['options'],
    'weight' => 100,
  );
  return $operations;
}