2 require_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
67 $this->obj_orgu->update();
75 protected function initForm() {
76 $this->
setFormAction($this->ctrl->getFormAction($this->parent_gui));
77 $this->
setTitle($this->lng->txt(
'orgu_settings'));
81 $item->setValue($this->obj_orgu->getTitle());
85 $item->
setValue($this->obj_orgu->getDescription());
89 $item->setTitle($this->lng->txt(
'orgu_type'));
94 foreach ($types as $type) {
95 $options[$type->getId()] = $type->getTitle();
100 $item->setValue($this->obj_orgu->getOrgUnitTypeId());
104 $item->setTitle($this->lng->txt(
'ext_id'));
108 $item->
setValue($this->obj_orgu->getImportId());
124 $this->obj_orgu->setOrgUnitTypeId($this->
getInput(
'orgu_type'));
125 $this->obj_orgu->setImportId($this->
getInput(
'ext_id'));
126 $this->obj_orgu->setTitle($this->
getInput(
'title'));
127 $this->obj_orgu->setDescription($this->
getInput(
'description'));
135 $translations = $this->obj_orgu->getTranslations();
136 $lang_code_default =
'';
137 $lang_codes =
array();
138 foreach ($translations[
'Fobject'] as $translation) {
139 if ($translation[
'lang_default']) {
140 $lang_code_default = $translation[
'lang'];
142 $lang_codes[] = $translation[
'lang'];
144 $lang_code = (in_array($this->
user->getLanguage(), $lang_codes)) ? $this->
user->getLanguage() : $lang_code_default;
145 $this->obj_orgu->updateTranslation($this->
getInput(
'title'), $this->
getInput(
'description'), $lang_code, 0);
setValue($a_value)
Set Value.
static getAllTypes()
Get array of all instances of ilOrgUnitType objects.
if(!is_array($argv)) $options
This class represents a text property in a property form.
Create styles array
The data for the language used.
This class represents a text area property in a property form.
setValue($a_value)
Set Value.