public function ProfileListBuilder::getDefaultOperations in Linkit 8.4
Same name and namespace in other branches
- 8.5 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 47 - Contains \Drupal\linkit\ProfileListBuilder.
Class
- ProfileListBuilder
- Defines a class to build a listing of profile entities.
Namespace
Drupal\linkitCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if (isset($operations['edit'])) {
$operations['edit']['title'] = t('Edit profile');
}
$operations['matchers'] = [
'title' => t('Manage matchers'),
'weight' => 10,
'url' => Url::fromRoute('linkit.matchers', [
'linkit_profile' => $entity
->id(),
]),
];
$operations['attributes'] = [
'title' => t('Manage attributes'),
'weight' => 20,
'url' => Url::fromRoute('linkit.attributes', [
'linkit_profile' => $entity
->id(),
]),
];
return $operations;
}