function RoleListBuilder::getDefaultOperations
Same name in other branches
- 9 core/modules/user/src/RoleListBuilder.php \Drupal\user\RoleListBuilder::getDefaultOperations()
- 8.9.x core/modules/user/src/RoleListBuilder.php \Drupal\user\RoleListBuilder::getDefaultOperations()
- 10 core/modules/user/src/RoleListBuilder.php \Drupal\user\RoleListBuilder::getDefaultOperations()
Overrides ConfigEntityListBuilder::getDefaultOperations
File
-
core/
modules/ user/ src/ RoleListBuilder.php, line 83
Class
- RoleListBuilder
- Defines a class to build a listing of user role entities.
Namespace
Drupal\userCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if ($entity->hasLinkTemplate('edit-permissions-form')) {
$operations['permissions'] = [
'title' => $this->t('Edit permissions'),
'weight' => 20,
'url' => $entity->toUrl('edit-permissions-form'),
];
}
return $operations;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.