5 require_once(
"./Modules/Wiki/classes/class.ilPCAMDPageList.php");
6 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
24 public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
28 $this->tpl = $DIC[
"tpl"];
29 $this->ctrl = $DIC->ctrl();
30 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
39 $next_class = $this->ctrl->getNextClass($this);
42 $cmd = $this->ctrl->getCmd();
44 switch ($next_class) {
67 $tpl->setContent($a_form->getHTML());
84 $tpl->setContent($a_form->getHTML());
97 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
101 $form->setTitle($this->lng->txt(
"cont_insert_amd_page_list"));
103 $form->setTitle($this->lng->txt(
"cont_update_amd_page_list"));
105 $form->setDescription($this->lng->txt(
"wiki_page_list_form_info"));
107 $mode =
new ilSelectInputGUI($this->lng->txt(
"wiki_page_list_mode"),
"mode");
109 0 => $this->lng->txt(
"wiki_page_list_mode_unordered"),
110 1 => $this->lng->txt(
"wiki_page_list_mode_ordered")
112 $mode->setRequired(
true);
113 $form->addItem($mode);
115 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
117 $this->record_gui->setPropertyForm(
$form);
120 $mode->setValue($this->content_obj->getMode());
121 $this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
124 $this->record_gui->parse();
126 $no_fields = (count(
$form->getItems()) == 1);
133 $form->addCommandButton(
"create_amd_page_list", $this->lng->txt(
"select"));
135 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
138 $form->addCommandButton(
"update", $this->lng->txt(
"select"));
140 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
152 if (
$form->checkInput()) {
153 $elements = $this->record_gui->importSearchForm();
154 if (is_array($elements)) {
156 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
157 $this->content_obj->setData($elements,
$form->getInput(
"mode"));
158 $this->updated = $this->pg_obj->update();
159 if ($this->updated ===
true) {
160 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
175 if (
$form->checkInput()) {
176 $elements = $this->record_gui->importSearchForm();
177 if (is_array($elements)) {
178 $this->content_obj->setData($elements,
$form->getInput(
"mode"));
179 $this->updated = $this->pg_obj->update();
180 if ($this->updated ===
true) {
181 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
186 $this->pg_obj->addHierIDs();
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, ...)
if(isset($_POST['submit'])) $form
displayValidationError()
display validation errors
initForm($a_insert=false)
Init courses form.
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.