19declare(strict_types=1);
24use ILIAS\User\Profile\Fields\NoOverrides;
50 return AvailableSections::Access;
108 if ($user !== null) {
111 return $this->buildMultiselect(
$lng);
119 if (!is_array($input)) {
123 $rbac_admin = new \ilRbacAdmin();
124 foreach ($input as $role_id) {
125 $rbac_admin->assignUser((
int) $role_id, $user->getId());
133 $rbac_review = new \ilRbacReview();
134 $assigned_roles = $rbac_review->assignedRoles($user->
getId());
137 $rbac_review->getGlobalRolesArray(),
138 fn(
string $c, array $v) => in_array($v[
'obj_id'], $assigned_roles)
139 ?
$c . $this->object_cache->lookupTitle($v[
'obj_id']) .
', '
154 $this->retrieveValueFromUser($user)
161 $rbac_review = new \ilRbacReview();
162 $input = new \ilMultiSelectInputGUI($this->
getLabel($lng));
165 $rbac_review->getGlobalRolesArray(),
166 function (array
$c, array $v): array {
170 $c[$v[
'obj_id']] = $this->object_cache->lookupTitle($v[
'obj_id']);
176 $input->setRequired(
true);
availableInCertificatesForcedTo()
retrieveValueFromUser(\ilObjUser $user)
buildMultiSelect(Language $lng)
buildNonEditableInput(Language $lng, \ilObjUser $user)
visibleInStudyProgrammesForcedTo()
visibleInCoursesForcedTo()
visibleInGroupsForcedTo()
addValueToUserObject(\ilObjUser $user, mixed $input, ?\ilPropertyFormGUI $form=null)
visibleInRegistrationForcedTo()
getLegacyInput(Language $lng, Context $context, ?\ilObjUser $user=null)
You don't need to add a post_var to the input as the User will handle this for you,...
__construct(private readonly \ilObjectDataCache $object_cache)
changeableByUserForcedTo()
This class represents a non editable value in a property form.
if(!file_exists('../ilias.ini.php'))