You are here

public function ActionListBuilder::getDefaultOperations in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/action/src/ActionListBuilder.php \Drupal\action\ActionListBuilder::getDefaultOperations()
  2. 9 core/modules/action/src/ActionListBuilder.php \Drupal\action\ActionListBuilder::getDefaultOperations()

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

core/modules/action/src/ActionListBuilder.php, line 99

Class

ActionListBuilder
Defines a class to build a listing of action entities.

Namespace

Drupal\action

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = $entity
    ->isConfigurable() ? parent::getDefaultOperations($entity) : [];
  if (isset($operations['edit'])) {
    $operations['edit']['title'] = t('Configure');
  }
  return $operations;
}