42 $next_class = $this->
ctrl->getNextClass($this);
45 $cmd = $this->
ctrl->getCmd();
47 switch ($next_class) {
85 $form->setFormAction($ilCtrl->getFormAction($this));
87 $form->setTitle($this->
lng->txt(
"cont_insert_amd_page_list"));
89 $form->setTitle($this->
lng->txt(
"cont_update_amd_page_list"));
91 $form->setDescription($this->
lng->txt(
"wiki_page_list_form_info"));
94 $mode->setOptions(array(
95 0 => $this->
lng->txt(
"wiki_page_list_mode_unordered"),
96 1 => $this->
lng->txt(
"wiki_page_list_mode_ordered")
98 $mode->setRequired(
true);
99 $form->addItem($mode);
108 $this->record_gui->setPropertyForm($form);
111 $mode->setValue($this->content_obj->getMode());
112 $this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
115 $this->record_gui->parse();
117 $no_fields = (count($form->getItems()) === 1);
119 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"wiki_pg_list_no_search_fields"));
124 $form->addCommandButton(
"create_amd_page_list", $this->
lng->txt(
"select"));
126 $form->addCommandButton(
"cancelCreate", $this->
lng->txt(
"cancel"));
129 $form->addCommandButton(
"update", $this->
lng->txt(
"select"));
131 $form->addCommandButton(
"cancelUpdate", $this->
lng->txt(
"cancel"));
140 if ($form->checkInput()) {
141 $elements = $this->record_gui->importSearchForm();
142 if (is_array($elements)) {
144 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
145 $this->content_obj->setData($elements, $form->getInput(
"mode"));
146 $this->updated = $this->pg_obj->update();
147 if ($this->updated ===
true) {
148 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
159 if ($form->checkInput()) {
160 $elements = $this->record_gui->importSearchForm();
161 if (is_array($elements)) {
162 $this->content_obj->setData($elements, $form->getInput(
"mode"));
163 $this->updated = $this->pg_obj->update();
164 if ($this->updated ===
true) {
165 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
170 $this->pg_obj->addHierIDs();
edit(ilPropertyFormGUI $a_form=null)
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAdvancedMDRecordGUI $record_gui
initForm(bool $a_insert=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
setContent(string $a_html)
Sets content for standard template.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
insert(ilPropertyFormGUI $a_form=null)
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...