You are here

protected function MediaGalleryListBuilder::getDefaultOperations in Media Gallery 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

File

src/MediaGalleryListBuilder.php, line 110

Class

MediaGalleryListBuilder
Provides a list controller for the media gallery entity type.

Namespace

Drupal\media_gallery

Code

protected function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $destination = $this->redirectDestination
    ->getAsArray();
  foreach ($operations as $key => $operation) {
    $operations[$key]['query'] = $destination;
  }
  return $operations;
}