ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPCAMDPageListGUI Class Reference

Class ilPCAMDPageListGUI. More...

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

Public Member Functions

 ilPCAMDPageListGUI ($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 insert (ilPropertyFormGUI $a_form=null)
 Insert courses form. More...
 
 edit (ilPropertyFormGUI $a_form=null)
 Edit courses form. More...
 
 create ()
 Create new courses. More...
 
 update ()
 Update courses. More...
 
- Public Member Functions inherited from ilPageContentGUI
 ilPageContentGUI ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public. More...
 
 setContentObject ($a_val)
 Set content object. More...
 
 getContentObject ()
 Get content object. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 setPageConfig ($a_val)
 Set Page Config. More...
 
 getPageConfig ()
 Get Page Config. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 getStyle ()
 Get style object. More...
 
 setCharacteristics ($a_chars)
 Set Characteristics. More...
 
 getCharacteristics ()
 Get characteristics. More...
 
 getHierId ()
 get hierarchical id in dom object More...
 
 setHierId ($a_hier_id)
 get hierarchical id in dom object More...
 
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl. More...
 
 delete ()
 delete content element More...
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 displayValidationError ()
 display validation errors More...
 
 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 ($a_type)
 Get table templates. More...
 

Protected Member Functions

 initForm ($a_insert=false)
 Init courses form. More...
 
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons. More...
 
- Data Fields inherited from ilPageContentGUI
 $content_obj
 
 $ilias
 
 $tpl
 
 $lng
 
 $ctrl
 
 $pg_obj
 
 $hier_id
 
 $dom
 
 $updated
 
 $target_script
 
 $return_location
 
 $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static $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 $common_bb_buttons
 

Detailed Description

Class ilPCAMDPageListGUI.

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
Version
$I$

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

Member Function Documentation

◆ create()

ilPCAMDPageListGUI::create ( )

Create new courses.

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

References ilPageContentGUI\getPage(), initForm(), and insert().

139  {
140  $form = $this->initForm(true);
141  if($form->checkInput())
142  {
143  $elements = $this->record_gui->importSearchForm();
144  if(is_array($elements))
145  {
146  $this->content_obj = new ilPCAMDPageList($this->getPage());
147  $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
148  $this->content_obj->setData($elements);
149  $this->updated = $this->pg_obj->update();
150  if ($this->updated === true)
151  {
152  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
153  }
154  }
155  }
156 
157  $form->setValuesByPost();
158  return $this->insert($form);
159  }
Class ilPCAMDPageList.
initForm($a_insert=false)
Init courses form.
insert(ilPropertyFormGUI $a_form=null)
Insert courses form.
+ Here is the call graph for this function:

◆ edit()

ilPCAMDPageListGUI::edit ( ilPropertyFormGUI  $a_form = null)

Edit courses form.

Parameters
ilPropertyFormGUI$a_form

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

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), and initForm().

Referenced by update().

74  {
75  global $tpl;
76 
77  $this->displayValidationError();
78 
79  if(!$a_form)
80  {
81  $a_form = $this->initForm();
82  }
83  $tpl->setContent($a_form->getHTML());
84  }
displayValidationError()
display validation errors
initForm($a_insert=false)
Init courses form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilPCAMDPageListGUI::executeCommand ( )

execute command

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

References $cmd, and $ret.

33  {
34  // get next class that processes or forwards current command
35  $next_class = $this->ctrl->getNextClass($this);
36 
37  // get current command
38  $cmd = $this->ctrl->getCmd();
39 
40  switch($next_class)
41  {
42  default:
43  $ret =& $this->$cmd();
44  break;
45  }
46 
47  return $ret;
48  }
$cmd
Definition: sahs_server.php:35

◆ ilPCAMDPageListGUI()

ilPCAMDPageListGUI::ilPCAMDPageListGUI (   $a_pg_obj,
  $a_content_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Constructor public.

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

25  {
26  parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
27  }

◆ initForm()

ilPCAMDPageListGUI::initForm (   $a_insert = false)
protected

Init courses form.

Parameters
bool$a_insert
Returns
ilPropertyFormGUI

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

References $ilCtrl, ilPageContentGUI\getPage(), and ilAdvancedMDRecordGUI\MODE_SEARCH.

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

93  {
94  global $ilCtrl;
95 
96  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
97  $form = new ilPropertyFormGUI();
98  $form->setFormAction($ilCtrl->getFormAction($this));
99  if ($a_insert)
100  {
101  $form->setTitle($this->lng->txt("cont_insert_amd_page_list"));
102  }
103  else
104  {
105  $form->setTitle($this->lng->txt("cont_update_amd_page_list"));
106  }
107  $form->setDescription($this->lng->txt("wiki_page_list_form_info"));
108 
109  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
110  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_SEARCH,'wiki',$this->getPage()->getWikiId(),'wpg',$this->getPage()->getId());
111  $this->record_gui->setPropertyForm($form);
112  $this->record_gui->setSelectedOnly(true);
113 
114  if (!$a_insert)
115  {
116  $this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
117  }
118 
119  $this->record_gui->parse();
120 
121  if ($a_insert)
122  {
123  $form->addCommandButton("create_amd_page_list", $this->lng->txt("select"));
124  $form->addCommandButton("cancelCreate", $this->lng->txt("cancel"));
125  }
126  else
127  {
128  $form->addCommandButton("update", $this->lng->txt("select"));
129  $form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
130  }
131 
132  return $form;
133  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

ilPCAMDPageListGUI::insert ( ilPropertyFormGUI  $a_form = null)

Insert courses form.

Parameters
ilPropertyFormGUI$a_form

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

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), and initForm().

Referenced by create().

56  {
57  global $tpl;
58 
59  $this->displayValidationError();
60 
61  if(!$a_form)
62  {
63  $a_form = $this->initForm(true);
64  }
65  $tpl->setContent($a_form->getHTML());
66  }
displayValidationError()
display validation errors
initForm($a_insert=false)
Init courses form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilPCAMDPageListGUI::update ( )

Update courses.

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

References $valid, edit(), and initForm().

165  {
166  $form = $this->initForm();
167  $valid = $form->checkInput();
168  if($valid)
169  {
170  $elements = $this->record_gui->importSearchForm();
171  }
172  if(is_array($elements))
173  {
174  $this->content_obj->setData($elements);
175  $this->updated = $this->pg_obj->update();
176  if ($this->updated === true)
177  {
178  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
179  }
180  }
181 
182  $this->pg_obj->addHierIDs();
183  // $form->setValuesByPost();
184  return $this->edit($form);
185  }
edit(ilPropertyFormGUI $a_form=null)
Edit courses form.
$valid
initForm($a_insert=false)
Init courses form.
+ Here is the call graph for this function:

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