You are here

public function OembedProviderBucketListBuilder::getDefaultOperations in oEmbed Providers 2.x

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/OembedProviderBucketListBuilder.php, line 49

Class

OembedProviderBucketListBuilder
Provides a listing of custom oEmbed provider buckets.

Namespace

Drupal\oembed_providers

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $operations['edit'] = [
    'title' => $this
      ->t('Edit'),
    'weight' => 15,
    'url' => $entity
      ->toUrl('edit-form'),
  ];
  $operations['delete'] = [
    'title' => $this
      ->t('Delete'),
    'weight' => 15,
    'url' => $entity
      ->toUrl('delete-form'),
  ];
  return $operations;
}