public function LoginDestination::viewRoles in Login Destination 8.2
Same name and namespace in other branches
- 8 src/Entity/LoginDestination.php \Drupal\login_destination\Entity\LoginDestination::viewRoles()
Prepare list of roles for displaying.
Return value
mixed HTML view for list of roles.
Overrides LoginDestinationInterface::viewRoles
File
- src/
Entity/ LoginDestination.php, line 257
Class
- LoginDestination
- Defines a login destination configuration entity.
Namespace
Drupal\login_destination\EntityCode
public function viewRoles() {
$roles = $this
->getAllSystemRoles();
$items = array_values(array_intersect_key($roles, $this->roles));
return $this
->renderItemList($items, $this
->t('All roles'));
}