Ejemplo n.º 1
0
 public function role(array $params)
 {
     if (!empty($params['roleId'])) {
         $par = new ADMIN_UserListParams();
         $par->setType('role');
         $par->setExtra(array('roleId' => (int) $params['roleId']));
         $this->addComponent('userList', new ADMIN_CMP_UserList($par));
         $role = BOL_AuthorizationService::getInstance()->getRoleById((int) $params['roleId']);
         $roleLabel = OW::getLanguage()->text('base', 'authorization_role_' . $role->name);
         OW::getDocument()->setHeading(OW::getLanguage()->text('admin', 'heading_user_role', array('role' => $roleLabel)));
     }
     OW::getDocument()->setHeadingIconClass('ow_ic_user');
     $js = UTIL_JsGenerator::newInstance()->newVariable('rolesUrl', OW::getRouter()->urlForRoute('admin_user_roles'))->jQueryEvent('#back-to-roles', 'click', 'document.location.href = rolesUrl');
     OW::getDocument()->addOnloadScript($js);
 }