You are here

public function LoginDestination::viewRoles in Login Destination 8

Same name and namespace in other branches
  1. 8.2 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 243

Class

LoginDestination
Defines a login destination configuration entity.

Namespace

Drupal\login_destination\Entity

Code

public function viewRoles() {
  $roles = $this
    ->getAllSystemRoles();
  $items = array_values(array_intersect_key($roles, $this->roles));
  return $this
    ->renderItemList($items, t('All roles'));
}