19declare(strict_types=1);
 
   46        $this->
lng->loadLanguageModule(
'rbac');
 
   52        $option->setInfo($this->
lng->txt(
'tos_crit_type_usr_global_role_info'));
 
   55            $this->
lng->txt(
'perm_global_role'),
 
   56            $this->type->getTypeIdent() . 
'_role_id' 
   58        $roleSelection->setRequired(
true);
 
   61        foreach ($this->rbacReview->getGlobalRoles() as $roleId) {
 
   62            $options[$roleId] = $this->objectCache->lookupTitle($roleId);
 
   65        natcasesort($options);
 
   67        $roleSelection->setOptions([
'' => $this->
lng->txt(
'please_choose')] + $options);
 
   68        $roleSelection->setValue((
string) ((
int) (
$config[
'role_id'] ?? 0)));
 
   70        $option->addSubItem($roleSelection);
 
   78            'role_id' => (
int) $form->
getInput($this->type->getTypeIdent() . 
'_role_id')
 
   86        return $this->
lng->txt(
'tos_crit_type_usr_global_role');
 
   91        $roleId = 
$config[
'role_id'] ?? 0;
 
   93        if (!is_numeric($roleId) || $roleId < 1 || $roleId > PHP_INT_MAX || is_float($roleId)) {
 
   94            return $uiFactory->
legacy(
'');
 
   97        $roleId = (
int) $roleId;
 
   98        if (!in_array($roleId, $this->rbacReview->getGlobalRoles(), 
true)) {
 
   99            return $uiFactory->
legacy($this->
lng->txt(
'deleted'));
 
  102        return $uiFactory->
legacy($this->objectCache->lookupTitle($roleId));
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
class ilRbacReview Contains Review functions of core Rbac.
 
Class ilTermsOfServiceCriterionConfig.
 
Class ilTermsOfServiceUserHasGlobalRoleCriterionGUI.
 
appendOption(ilRadioGroupInputGUI $group, ilTermsOfServiceCriterionConfig $config)
 
__construct(ilTermsOfServiceUserHasGlobalRoleCriterion $type, ilLanguage $lng, ilRbacReview $rbacReview, ilObjectDataCache $objectCache)
 
getConfigByForm(ilPropertyFormGUI $form)
 
ilTermsOfServiceUserHasGlobalRoleCriterion $type
 
getValuePresentation(ilTermsOfServiceCriterionConfig $config, Factory $uiFactory)
 
ilObjectDataCache $objectCache
 
Class ilTermsOfServiceUserHasGlobalRoleCriterion.
 
A component is the most general form of an entity in the UI.
 
This is how the factory for UI elements looks.
 
Interface ilTermsOfServiceCriterionTypeGUI.
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...