You are here

public function PaymentMethodListBuilder::getDefaultOperations in Ubercart 8.4

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

payment/uc_payment/src/PaymentMethodListBuilder.php, line 91

Class

PaymentMethodListBuilder
Defines a class to build a listing of payment method configuration entities.

Namespace

Drupal\uc_payment

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);

  // Locked payment methods may not be deleted.
  if (isset($operations['delete']) && $entity
    ->isLocked()) {
    unset($operations['delete']);
  }
  return $operations;
}