1 <?php declare(strict_types=1);
51 $this->lng->loadLanguageModule(
'rbac');
60 $option->
setInfo($this->lng->txt(
'tos_crit_type_usr_global_role_info'));
63 $this->lng->txt(
'perm_global_role'),
64 $this->type->getTypeIdent() .
'_role_id' 66 $roleSelection->setRequired(
true);
69 foreach ($this->rbacReview->getGlobalRoles() as $roleId) {
70 $options[$roleId] = $this->objectCache->lookupTitle($roleId);
75 $roleSelection->setOptions([
'' => $this->lng->txt(
'please_choose')] + $options);
76 $roleSelection->setValue((
int) ($config[
'role_id'] ?? 0));
78 $option->addSubItem($roleSelection);
89 'role_id' => (
int) $form->
getInput($this->type->getTypeIdent() .
'_role_id')
100 return $this->lng->txt(
'tos_crit_type_usr_global_role');
108 $roleId = $config[
'role_id'] ?? 0;
110 if (!is_numeric($roleId) || $roleId < 1 || is_float($roleId)) {
111 return $uiFactory->
legacy(
'');
114 return $uiFactory->
legacy($this->objectCache->lookupTitle($roleId));
This class represents an option in a radio group.
getIdentPresentation()
string
Interface ilTermsOfServiceCriterionTypeGUI.
Class ilTermsOfServiceUserHasGlobalRoleCriterion.
setInfo($a_info)
Set Info.
Class ilTermsOfServiceCriterionConfig.
This is how the factory for UI elements looks.
appendOption(ilRadioGroupInputGUI $group, ilTermsOfServiceCriterionConfig $config)
legacy($content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compon...
Class ilTermsOfServiceUserHasGlobalRoleCriterionGUI.
__construct(ilTermsOfServiceUserHasGlobalRoleCriterion $type, ilLanguage $lng, ilRbacReview $rbacReview, ilObjectDataCache $objectCache)
ilTermsOfServiceUserHasGlobalRoleCriterionGUI constructor.
getValuePresentation(ilTermsOfServiceCriterionConfig $config, Factory $uiFactory)
Component
getConfigByForm(ilPropertyFormGUI $form)
ilTermsOfServiceCriterionConfig
class ilRbacReview Contains Review functions of core Rbac.