You are here

public function BrowserListBuilder::getDefaultOperations in Paragraphs Browser 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 ConfigEntityListBuilder::getDefaultOperations

File

src/Controller/BrowserListBuilder.php, line 35

Class

BrowserListBuilder
Provides a listing of BrowserType.

Namespace

Drupal\paragraphs_browser\Controller

Code

public function getDefaultOperations(EntityInterface $entity) {

  /** @var \Drupal\field\FieldConfigInterface $entity */
  $operations = parent::getDefaultOperations($entity);
  if (isset($operations['edit'])) {
    $operations['edit']['weight'] = 30;
  }
  $operations['groups'] = array(
    'title' => t('Manage Groups'),
    'weight' => -40,
    'url' => $entity
      ->toUrl('groups-form'),
  );
  return $operations;
}