You are here

public function CheckListBuilder::getDefaultOperations in Production check & Production monitor 8

Gets this list's default operations.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.

Return value

array The array structure is identical to the return value of self::getOperations().

Overrides ConfigEntityListBuilder::getDefaultOperations

File

src/CheckListBuilder.php, line 96

Class

CheckListBuilder
Defines a class to build a listing of prod check processor entities.

Namespace

Drupal\prod_check

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = $entity
    ->isConfigurable() ? parent::getDefaultOperations($entity) : [];

  // Unset delete operation to prevent mistakes
  unset($operations['delete']);

  // Rename edit operation
  if (isset($operations['edit'])) {
    $operations['edit']['title'] = t('Configure');
  }
  return $operations;
}