You are here

protected function AppListBuilder::getDefaultOperations in Apigee Edge 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 EntityListBuilder::getDefaultOperations

1 call to AppListBuilder::getDefaultOperations()
DeveloperAppListBuilderForDeveloper::getDefaultOperations in src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php
Gets this list's default operations.
1 method overrides AppListBuilder::getDefaultOperations()
DeveloperAppListBuilderForDeveloper::getDefaultOperations in src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php
Gets this list's default operations.

File

src/Entity/ListBuilder/AppListBuilder.php, line 131

Class

AppListBuilder
General app list builder for developer and team apps.

Namespace

Drupal\apigee_edge\Entity\ListBuilder

Code

protected function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  if ($entity
    ->access('analytics') && $entity
    ->hasLinkTemplate('analytics')) {
    $operations['analytics'] = [
      'title' => $this
        ->t('Analytics'),
      'weight' => 150,
      'url' => $entity
        ->toUrl('analytics'),
    ];
  }
  return $operations;
}