ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPCLoginPageElementGUI Class Reference

Class ilLoginPageElementGUI. More...

+ Inheritance diagram for ilPCLoginPageElementGUI:
+ Collaboration diagram for ilPCLoginPageElementGUI:

Public Member Functions

 ilPCLoginPageElementGUI ($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor @access public. More...
 
 getLoginPageElements ()
 Get login page elements. More...
 
 executeCommand ()
 execute command More...
 
 insert ()
 Insert new resources component form. More...
 
 edit ($a_insert=false)
 Edit resources form. More...
 
 create ()
 Create new Login Page Element. More...
 
 update ()
 Update Login page element. More...
 
- Public Member Functions inherited from ilPageContentGUI
 ilPageContentGUI ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor @access 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...
 

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;"
 
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 
- Protected Attributes inherited from ilPageContentGUI
 $log
 
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons
 

Detailed Description

Class ilLoginPageElementGUI.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilPCLoginPageElementGUI:

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

Member Function Documentation

◆ create()

ilPCLoginPageElementGUI::create ( )

Create new Login Page Element.

Definition at line 145 of file class.ilPCLoginPageElementGUI.php.

146 {
147 $this->content_obj = new ilPCLoginPageElement($this->getPage());
148 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
149 $this->content_obj->setLoginPageElementType($_POST["type"]);
150 $this->content_obj->setAlignment($_POST['horizontal_align']);
151
152 $this->updated = $this->pg_obj->update();
153 if ($this->updated === true)
154 {
155 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
156 }
157 else
158 {
159 $this->insert();
160 }
161 }
insert()
Insert new resources component form.
Class ilPCLoginPageElement.
$_POST['username']
Definition: cron.php:12

References $_POST, ilPageContentGUI\getPage(), and insert().

+ Here is the call graph for this function:

◆ edit()

ilPCLoginPageElementGUI::edit (   $a_insert = false)

Edit resources form.

Definition at line 75 of file class.ilPCLoginPageElementGUI.php.

76 {
77 global $ilCtrl, $tpl, $lng, $objDefinition;
78
80
81 // edit form
82 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
83 $form = new ilPropertyFormGUI();
84 $form->setFormAction($ilCtrl->getFormAction($this));
85 if ($a_insert)
86 {
87 $form->setTitle($this->lng->txt("cont_insert_login_page"));
88 }
89 else
90 {
91 $form->setTitle($this->lng->txt("cont_update_login_page"));
92 }
93
94 // type selection
95 $type_prop = new ilRadioGroupInputGUI($this->lng->txt("cont_type"),"type");
96
97 foreach(ilPCLoginPageElement::getAllTypes() as $index => $lang_key)
98 {
99 $types[$index] = $this->lng->txt('cont_lpe_'.$lang_key);
100
101 $option = new ilRadioOption($this->lng->txt('cont_lpe_'.$lang_key), $index);
102 $type_prop->addOption($option);
103
104 }
105
106 $selected = $a_insert
107 ? ""
108 : $this->content_obj->getLoginPageElementType();
109 $type_prop->setValue($selected);
110 $form->addItem($type_prop);
111
112 // horizonal align
113 $align_prop = new ilSelectInputGUI($this->lng->txt("cont_align"),"horizontal_align");
114 $options = array(
115 "Left" => $lng->txt("cont_left"),
116 "Center" => $lng->txt("cont_center"),
117 "Right" => $lng->txt("cont_right"));
118# "LeftFloat" => $lng->txt("cont_left_float"),
119# "RightFloat" => $lng->txt("cont_right_float"));
120 $align_prop->setOptions($options);
121 $align_prop->setValue($this->content_obj->getAlignment());
122 $form->addItem($align_prop);
123
124
125 // save/cancel buttons
126 if ($a_insert)
127 {
128 $form->addCommandButton("create_login_page_element", $lng->txt("save"));
129 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
130 }
131 else
132 {
133 $form->addCommandButton("update_login_page_element", $lng->txt("save"));
134 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
135 }
136 $html = $form->getHTML();
137 $tpl->setContent($html);
138 return $ret;
139 }
static getAllTypes()
Get all types.
displayValidationError()
display validation errors
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options

References $html, $ilCtrl, ilPageContentGUI\$lng, $options, $ret, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), and ilPCLoginPageElement\getAllTypes().

Referenced by insert(), and update().

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

◆ executeCommand()

ilPCLoginPageElementGUI::executeCommand ( )

execute command

Definition at line 46 of file class.ilPCLoginPageElementGUI.php.

47 {
48 // get next class that processes or forwards current command
49 $next_class = $this->ctrl->getNextClass($this);
50
51 // get current command
52 $cmd = $this->ctrl->getCmd();
53
54 switch($next_class)
55 {
56 default:
57 $ret =& $this->$cmd();
58 break;
59 }
60
61 return $ret;
62 }
$cmd
Definition: sahs_server.php:35

References $cmd, and $ret.

◆ getLoginPageElements()

ilPCLoginPageElementGUI::getLoginPageElements ( )

Get login page elements.

Returns
ilPCLoginPageElement $lp_elements

Definition at line 38 of file class.ilPCLoginPageElementGUI.php.

39 {
40 return $this->lp_elements;
41 }

◆ ilPCLoginPageElementGUI()

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

Constructor @access public.

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

25 {
26 parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
27
28 if(!is_object($this->content_obj))
29 {
30 $this->content_obj = new ilPCLoginPageElement($this->getPage());
31 }
32 }

References ilPageContentGUI\getPage().

+ Here is the call graph for this function:

◆ insert()

ilPCLoginPageElementGUI::insert ( )

Insert new resources component form.

Definition at line 67 of file class.ilPCLoginPageElementGUI.php.

68 {
69 $this->edit(true);
70 }
edit($a_insert=false)
Edit resources form.

References edit().

Referenced by create().

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

◆ update()

ilPCLoginPageElementGUI::update ( )

Update Login page element.

Definition at line 166 of file class.ilPCLoginPageElementGUI.php.

167 {
168 $this->content_obj->setLoginPageElementType($_POST["type"]);
169 $this->content_obj->setAlignment($_POST['horizontal_align']);
170 $this->updated = $this->pg_obj->update();
171 if ($this->updated === true)
172 {
173 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
174 }
175 else
176 {
177 $this->pg_obj->addHierIDs();
178 $this->edit();
179 }
180 }

References $_POST, and edit().

+ Here is the call graph for this function:

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