You are here

public function ProfileListBuilder::getDefaultOperations in Linkit 8.5

Same name and namespace in other branches
  1. 8.4 src/ProfileListBuilder.php \Drupal\linkit\ProfileListBuilder::getDefaultOperations()

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/ProfileListBuilder.php, line 42

Class

ProfileListBuilder
Defines a class to build a listing of profile entities.

Namespace

Drupal\linkit

Code

public function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  if (isset($operations['edit'])) {
    $operations['edit']['title'] = $this
      ->t('Edit profile');
  }
  $operations['matchers'] = [
    'title' => $this
      ->t('Manage matchers'),
    'weight' => 10,
    'url' => Url::fromRoute('linkit.matchers', [
      'linkit_profile' => $entity
        ->id(),
    ]),
  ];
  return $operations;
}