Issue #1995046 by pfrenssen, andypost, tim.plunkett: BlockListController doesn't call parent::getOperations() and so 'delete' is the default dropbutton operation.

8.0.x
webchick 2013-08-14 13:08:24 -07:00
parent 3cf100dfcd
commit 129031e49d
2 changed files with 6 additions and 14 deletions

View File

@ -236,18 +236,11 @@ class BlockListController extends ConfigEntityListController implements FormInte
* {@inheritdoc}
*/
public function getOperations(EntityInterface $entity) {
$uri = $entity->uri();
$operations = array();
$operations['configure'] = array(
'title' => t('configure'),
'href' => $uri['path'],
'options' => $uri['options'],
);
$operations['delete'] = array(
'title' => t('delete'),
'href' => $uri['path'] . '/delete',
'options' => $uri['options'],
);
$operations = parent::getOperations($entity);
if (isset($operations['edit'])) {
$operations['edit']['title'] = t('Configure');
}
return $operations;
}

View File

@ -36,8 +36,7 @@ use Drupal\Core\Entity\EntityStorageControllerInterface;
* entity_keys = {
* "id" = "id",
* "label" = "label",
* "uuid" = "uuid",
* "status" = "status"
* "uuid" = "uuid"
* }
* )
*/