4 include_once(
"./Services/Component/classes/class.ilPluginConfigGUI.php");
5 include_once(
"class.ilCloudPluginConfig.php");
68 include_once(
"class.ilCloudPluginConfig.php");
90 $tpl->setContent($this->form->getHTML());
95 foreach ($this->
fields as $key => $item)
98 $values[$key] = $this->
object->getValue($key);
99 if (is_array($item[
"subelements"]))
101 foreach ($item[
"subelements"] as $subkey => $subitem)
103 $values[$key .
"_" . $subkey] = $this->
object->getValue($key .
"_" . $subkey);
109 $this->form->setValuesByArray($values);
119 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
122 foreach ($this->
fields as $key => $item)
124 $field =
new $item[
"type"]($this->plugin_object->txt($key), $key);
125 $field->setInfo($this->plugin_object->txt($item[
"info"]));
126 if (is_array($item[
"subelements"]))
128 foreach ($item[
"subelements"] as $subkey => $subitem)
130 $subfield =
new $subitem[
"type"]($this->plugin_object->txt($key .
"_" . $subkey), $key .
"_" . $subkey);
131 $subfield->setInfo($this->plugin_object->txt($subitem[
"info"]));
132 $field->addSubItem($subfield);
136 $this->form->addItem($field);
139 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
141 $this->form->setTitle($this->plugin_object->txt(
"configuration"));
142 $this->form->setFormAction($ilCtrl->getFormAction($this));
152 if ($this->form->checkInput())
156 foreach ($this->
fields as $key => $item)
159 $this->
object->setValue($key, $this->form->getInput($key));
160 if (is_array($item[
"subelements"]))
162 foreach ($item[
"subelements"] as $subkey => $subitem)
164 $this->
object->setValue($key .
"_" . $subkey, $this->form->getInput($key .
"_" . $subkey));
170 $ilCtrl->redirect($this,
"configure");
173 $this->form->setValuesByPost();
174 $tpl->setContent($this->form->getHtml());