ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
OrganisationalUnits.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\User\Profile\Fields\NoOverrides;
28
30{
31 use NoOverrides;
32
33 public function getIdentifier(): string
34 {
35 return 'org_units';
36 }
37
38 public function getLabel(Language $lng): string
39 {
40 return $lng->txt('objs_orgu');
41 }
42
43 public function getSection(): AvailableSections
44 {
45 return AvailableSections::Access;
46 }
47
48 public function hiddenInLists(): bool
49 {
50 return true;
51 }
52
53 public function exportForcedTo(): ?bool
54 {
55 return false;
56 }
57
58 public function changeableByUserForcedTo(): ?bool
59 {
60 return false;
61 }
62
63 public function requiredForcedTo(): ?bool
64 {
65 return false;
66 }
67
68 public function searchableForcedTo(): ?bool
69 {
70 return false;
71 }
72
73 public function availableInCertificatesForcedTo(): ?bool
74 {
75 return false;
76 }
77
78 public function getLegacyInput(
81 ?\ilObjUser $user = null
83 $input = new \ilNonEditableValueGUI($this->getLabel($lng));
84 if ($user === null) {
85 return $input;
86 }
87 $input->setValue(
88 $this->retrieveValueFromUser($user)
89 );
90 return $input;
91 }
92
93 public function addValueToUserObject(
94 \ilObjUser $user,
95 mixed $input,
96 ?\ilPropertyFormGUI $form = null
97 ): \ilObjUser {
98 return $user;
99 }
100
101 public function retrieveValueFromUser(\ilObjUser $user): string
102 {
103 return $user->getOrgUnitsRepresentation();
104 }
105}
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,...
addValueToUserObject(\ilObjUser $user, mixed $input, ?\ilPropertyFormGUI $form=null)
This class represents a property in a property form.
This class represents a non editable value in a property form.
User class.
This class represents a property form user interface.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31
$context
Definition: webdav.php:31