5 require_once(
"./Modules/Wiki/classes/class.ilPCAMDPageList.php");
6 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
24 function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
26 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
35 $next_class = $this->ctrl->getNextClass($this);
38 $cmd = $this->ctrl->getCmd();
65 $tpl->setContent($a_form->getHTML());
83 $tpl->setContent($a_form->getHTML());
96 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
98 $form->setFormAction($ilCtrl->getFormAction($this));
101 $form->setTitle($this->lng->txt(
"cont_insert_amd_page_list"));
105 $form->setTitle($this->lng->txt(
"cont_update_amd_page_list"));
107 $form->setDescription($this->lng->txt(
"wiki_page_list_form_info"));
109 $mode =
new ilSelectInputGUI($this->lng->txt(
"wiki_page_list_mode"),
"mode");
111 0 => $this->lng->txt(
"wiki_page_list_mode_unordered"),
112 1 => $this->lng->txt(
"wiki_page_list_mode_ordered")
114 $mode->setRequired(
true);
115 $form->addItem($mode);
117 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
119 $this->record_gui->setPropertyForm($form);
123 $mode->setValue($this->content_obj->getMode());
124 $this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
127 $this->record_gui->parse();
129 $no_fields = (count($form->getItems()) == 1);
139 $form->addCommandButton(
"create_amd_page_list", $this->lng->txt(
"select"));
141 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
147 $form->addCommandButton(
"update", $this->lng->txt(
"select"));
149 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
161 if($form->checkInput())
163 $elements = $this->record_gui->importSearchForm();
164 if(is_array($elements))
167 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
168 $this->content_obj->setData($elements, $form->getInput(
"mode"));
169 $this->updated = $this->pg_obj->update();
170 if ($this->updated ===
true)
172 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
178 return $this->
insert($form);
187 if($form->checkInput())
189 $elements = $this->record_gui->importSearchForm();
190 if(is_array($elements))
192 $this->content_obj->setData($elements, $form->getInput(
"mode"));
193 $this->updated = $this->pg_obj->update();
194 if ($this->updated ===
true)
196 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
201 $this->pg_obj->addHierIDs();
203 return $this->
edit($form);
edit(ilPropertyFormGUI $a_form=null)
Edit courses form.
create()
Create new courses.
executeCommand()
execute command
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
displayValidationError()
display validation errors
initForm($a_insert=false)
Init courses form.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
insert(ilPropertyFormGUI $a_form=null)
Insert courses form.
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor public.
Class ilPCAMDPageListGUI.