ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPCAMDPageListGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCAMDPageListGUI:
+ Collaboration diagram for ilPCAMDPageListGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
 executeCommand ()
 
 insert (?ilPropertyFormGUI $a_form=null)
 
 edit (?ilPropertyFormGUI $a_form=null)
 
 create ()
 
 update ()
 
- Public Member Functions inherited from ilPageContentGUI
 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id="", string $a_pc_id="0")
 
 setContentObject (ilPageContent $a_val)
 
 getContentObject ()
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 getStyle ()
 
 getCharacteristicsOfCurrentStyle (array $a_type)
 Get characteristics of current style and call setCharacteristics, if style is given. More...
 
 setCharacteristics (array $a_chars)
 
 getCharacteristics ()
 
 getHierId ()
 
 setHierId (string $a_hier_id)
 set hierarchical id in dom object More...
 
 delete ()
 
 displayValidationError ()
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions (string $a_type="")
 Get table templates. More...
 

Protected Member Functions

 initForm (bool $a_insert=false)
 
- Protected Member Functions inherited from ilPageContentGUI
 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 
 setEditorToolContext ()
 
 initEditor ()
 
 getEditorScriptTag (string $form_pc_id="", string $form_cname="")
 

Protected Attributes

ilAdvancedMDRecordGUI $record_gui = null
 
- Protected Attributes inherited from ilPageContentGUI
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS COPage InternalGUIService $gui
 
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
LOMServices $lom_services
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
Style Content CharacteristicManager $char_manager
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 
- Data Fields inherited from ilPageContentGUI
ilPageContent $content_obj
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilPageObject $pg_obj
 
string $hier_id = ""
 
DOMDocument $dom
 
 $updated
 
string $target_script = ""
 
string $return_location = ""
 
ilPageConfig $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static string $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Static Protected Attributes inherited from ilPageContentGUI
static array $common_bb_buttons
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Handles user commands on advanced md page list

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 23 of file class.ilPCAMDPageListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCAMDPageListGUI::__construct ( ilPageObject  $a_pg_obj,
?ilPageContent  $a_content_obj,
string  $a_hier_id,
string  $a_pc_id = "" 
)

Reimplemented from ilPageContentGUI.

Definition at line 27 of file class.ilPCAMDPageListGUI.php.

32 {
33 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
34 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCAMDPageListGUI::create ( )

Definition at line 137 of file class.ilPCAMDPageListGUI.php.

137 : void
138 {
139 $form = $this->initForm(true);
140 if ($form->checkInput()) {
141 $elements = $this->record_gui->importSearchForm();
142 if (is_array($elements)) {
143 $this->content_obj = new ilPCAMDPageList($this->getPage());
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);
149 }
150 }
151 }
152
153 $this->insert($form);
154 }
insert(?ilPropertyFormGUI $a_form=null)
initForm(bool $a_insert=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), ilPageContentGUI\getPage(), initForm(), and insert().

+ Here is the call graph for this function:

◆ edit()

ilPCAMDPageListGUI::edit ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 68 of file class.ilPCAMDPageListGUI.php.

68 : void
69 {
71
73
74 if (!$a_form) {
75 $a_form = $this->initForm();
76 }
77 $tpl->setContent($a_form->getHTML());
78 }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ILIAS\UICore\GlobalTemplate\setContent().

Referenced by update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilPCAMDPageListGUI::executeCommand ( )
Returns
mixed

Definition at line 39 of file class.ilPCAMDPageListGUI.php.

40 {
41 // get next class that processes or forwards current command
42 $next_class = $this->ctrl->getNextClass($this);
43
44 // get current command
45 $cmd = $this->ctrl->getCmd();
46
47 switch ($next_class) {
48 default:
49 $ret = $this->$cmd();
50 break;
51 }
52
53 return $ret;
54 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initForm()

ilPCAMDPageListGUI::initForm ( bool  $a_insert = false)
protected

Definition at line 80 of file class.ilPCAMDPageListGUI.php.

81 {
82 $ilCtrl = $this->ctrl;
83
84 $form = new ilPropertyFormGUI();
85 $form->setFormAction($ilCtrl->getFormAction($this));
86 if ($a_insert) {
87 $form->setTitle($this->lng->txt("cont_insert_amd_page_list"));
88 } else {
89 $form->setTitle($this->lng->txt("cont_update_amd_page_list"));
90 }
91 $form->setDescription($this->lng->txt("wiki_page_list_form_info"));
92
93 $mode = new ilSelectInputGUI($this->lng->txt("wiki_page_list_mode"), "mode");
94 $mode->setOptions(array(
95 0 => $this->lng->txt("wiki_page_list_mode_unordered"),
96 1 => $this->lng->txt("wiki_page_list_mode_ordered")
97 ));
98 $mode->setRequired(true);
99 $form->addItem($mode);
100
101 $this->record_gui = new ilAdvancedMDRecordGUI(
103 'wiki',
104 $this->getPage()->getWikiId(),
105 'wpg',
106 $this->getPage()->getId()
107 );
108 $this->record_gui->setPropertyForm($form);
109
110 if (!$a_insert) {
111 $mode->setValue($this->content_obj->getMode());
112 $this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
113 }
114
115 $this->record_gui->parse();
116
117 $no_fields = (count($form->getItems()) === 1);
118 if ($no_fields) {
119 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("wiki_pg_list_no_search_fields"));
120 }
121
122 if ($a_insert) {
123 if (!$no_fields) {
124 $form->addCommandButton("create", $this->lng->txt("select"));
125 }
126 $form->addCommandButton("cancelCreate", $this->lng->txt("cancel"));
127 } else {
128 if (!$no_fields) {
129 $form->addCommandButton("update", $this->lng->txt("select"));
130 }
131 $form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
132 }
133
134 return $form;
135 }
This class represents a property form user interface.
This class represents a selection list property in a property form.

References ilPageContentGUI\$ctrl, ILIAS\Survey\Mode\getId(), ilPageContentGUI\getPage(), ILIAS\Repository\lng(), and ilAdvancedMDRecordGUI\MODE_SEARCH.

Referenced by create(), edit(), insert(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

ilPCAMDPageListGUI::insert ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 56 of file class.ilPCAMDPageListGUI.php.

56 : void
57 {
59
61
62 if (!$a_form) {
63 $a_form = $this->initForm(true);
64 }
65 $tpl->setContent($a_form->getHTML());
66 }

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ILIAS\UICore\GlobalTemplate\setContent().

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilPCAMDPageListGUI::update ( )

Definition at line 156 of file class.ilPCAMDPageListGUI.php.

156 : void
157 {
158 $form = $this->initForm();
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);
166 }
167 }
168 }
169
170 $this->pg_obj->addHierIDs();
171 $this->edit($form);
172 }
edit(?ilPropertyFormGUI $a_form=null)

References ILIAS\Repository\ctrl(), edit(), and initForm().

+ Here is the call graph for this function:

Field Documentation

◆ $record_gui

ilAdvancedMDRecordGUI ilPCAMDPageListGUI::$record_gui = null
protected

Definition at line 25 of file class.ilPCAMDPageListGUI.php.


The documentation for this class was generated from the following file: