You are here

protected function CivicrmEntityListBuilder::getDefaultOperations in CiviCRM Entity 8.3

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 EntityListBuilder::getDefaultOperations

File

src/CivicrmEntityListBuilder.php, line 50

Class

CivicrmEntityListBuilder

Namespace

Drupal\civicrm_entity

Code

protected function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $operations['view'] = [
    'title' => $this
      ->t('View'),
    'weight' => 50,
    'url' => $entity
      ->toUrl(),
  ];
  return $operations;
}