GcConfig\Controller\RoleController::indexAction PHP Method

indexAction() public method

List all roles
public indexAction ( ) : Zend\View\Model\ViewModel | array
return Zend\View\Model\ViewModel | array
    public function indexAction()
    {
        $roleCollection = new Role\Collection();
        $roles = array();
        foreach ($roleCollection->getRoles() as $role) {
            if ($role->getName() !== Role\Model::PROTECTED_NAME) {
                $roles[] = $role;
            }
        }
        return array('roles' => $roles);
    }