34 $ilCtrl = $DIC[
'ilCtrl'];
41 $this->
ctrl = $ilCtrl;
56 $this->obj_orgu->update();
65 private function initForm():
void 71 $item->setRequired(
true);
72 $item->setValue($this->obj_orgu->getTitle());
76 $item->
setValue($this->obj_orgu->getDescription());
80 $item->setTitle($this->
lng->txt(
'orgu_type'));
83 $options = array(0 =>
'');
85 foreach ($types as
$type) {
86 $options[$type->getId()] = $type->getTitle();
90 $item->setOptions($options);
91 $item->setValue($this->obj_orgu->getOrgUnitTypeId());
95 $item->setTitle($this->
lng->txt(
'ext_id'));
99 $item->setValue($this->obj_orgu->getImportId());
115 $this->obj_orgu->setOrgUnitTypeId($this->
getInput(
'orgu_type'));
116 $this->obj_orgu->setImportId($this->
getInput(
'ext_id'));
117 $this->obj_orgu->setTitle($this->
getInput(
'title'));
118 $this->obj_orgu->setDescription($this->
getInput(
'description'));
128 $translations = $this->obj_orgu->getTranslations();
129 $lang_code_default =
'';
130 $lang_codes = array();
131 foreach ($translations as $translation) {
132 if ($translation[
'default']) {
133 $lang_code_default = $translation[
'lang'];
135 $lang_codes[] = $translation[
'lang'];
137 $lang_code = (in_array($this->
user->getLanguage(), $lang_codes,
true)) ? $this->
user->getLanguage() : $lang_code_default;
138 $this->obj_orgu->updateTranslation($this->
getInput(
'title'), $this->
getInput(
'description'), $lang_code, 0);
static getAllTypes()
Get array of all instances of ilOrgUnitType objects.
setValue(string $a_value)
Class ilObjectGUI Basic methods of all Output classes.
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.