ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPCLoginPageElementGUI Class Reference

Class ilLoginPageElementGUI. More...

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

Public Member Functions

 __construct ($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
 __construct ($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...
 

Protected Attributes

 $obj_definition
 
- Protected Attributes inherited from ilPageContentGUI
 $error
 
 $log
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons. More...
 
- Data Fields inherited from ilPageContentGUI
 $content_obj
 
 $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...
 
- 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.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Reimplemented from ilPageContentGUI.

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

30 {
31 global $DIC;
32
33 $this->ctrl = $DIC->ctrl();
34 $this->tpl = $DIC["tpl"];
35 $this->lng = $DIC->language();
36 $this->obj_definition = $DIC["objDefinition"];
37 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
38
39 if (!is_object($this->content_obj)) {
40 $this->content_obj = new ilPCLoginPageElement($this->getPage());
41 }
42 }
Class ilPCLoginPageElement.
global $DIC
Definition: saml.php:7

References $DIC, and ilPageContentGUI\getPage().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCLoginPageElementGUI::create ( )

Create new Login Page Element.

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

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

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 84 of file class.ilPCLoginPageElementGUI.php.

85 {
89 $objDefinition = $this->obj_definition;
90
92
93 // edit form
94 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
96 $form->setFormAction($ilCtrl->getFormAction($this));
97 if ($a_insert) {
98 $form->setTitle($this->lng->txt("cont_insert_login_page"));
99 } else {
100 $form->setTitle($this->lng->txt("cont_update_login_page"));
101 }
102
103 // type selection
104 $type_prop = new ilRadioGroupInputGUI($this->lng->txt("cont_type"), "type");
105
106 foreach (ilPCLoginPageElement::getAllTypes() as $index => $lang_key) {
107 $types[$index] = $this->lng->txt('cont_lpe_' . $lang_key);
108
109 $option = new ilRadioOption($this->lng->txt('cont_lpe_' . $lang_key), $index);
110 $type_prop->addOption($option);
111 }
112
113 $selected = $a_insert
114 ? ""
115 : $this->content_obj->getLoginPageElementType();
116 $type_prop->setValue($selected);
117 $form->addItem($type_prop);
118
119 // horizonal align
120 $align_prop = new ilSelectInputGUI($this->lng->txt("cont_align"), "horizontal_align");
121 $options = array(
122 "Left" => $lng->txt("cont_left"),
123 "Center" => $lng->txt("cont_center"),
124 "Right" => $lng->txt("cont_right"));
125 # "LeftFloat" => $lng->txt("cont_left_float"),
126 # "RightFloat" => $lng->txt("cont_right_float"));
127 $align_prop->setOptions($options);
128 $align_prop->setValue($this->content_obj->getAlignment());
129 $form->addItem($align_prop);
130
131
132 // save/cancel buttons
133 if ($a_insert) {
134 $form->addCommandButton("create_login_page_element", $lng->txt("save"));
135 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
136 } else {
137 $form->addCommandButton("update_login_page_element", $lng->txt("save"));
138 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
139 }
140 $html = $form->getHTML();
141 $tpl->setContent($html);
142 return $ret;
143 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
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
$index
Definition: metadata.php:60
$ret
Definition: parser.php:6
if(isset($_POST['submit'])) $form

References ilPageContentGUI\$ctrl, $form, $html, $ilCtrl, $index, ilPageContentGUI\$lng, $obj_definition, $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 56 of file class.ilPCLoginPageElementGUI.php.

57 {
58 // get next class that processes or forwards current command
59 $next_class = $this->ctrl->getNextClass($this);
60
61 // get current command
62 $cmd = $this->ctrl->getCmd();
63
64 switch ($next_class) {
65 default:
66 $ret = $this->$cmd();
67 break;
68 }
69
70 return $ret;
71 }

References $ret.

◆ getLoginPageElements()

ilPCLoginPageElementGUI::getLoginPageElements ( )

Get login page elements.

Returns
ilPCLoginPageElement $lp_elements

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

49 {
50 return $this->lp_elements;
51 }

◆ insert()

ilPCLoginPageElementGUI::insert ( )

Insert new resources component form.

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

77 {
78 $this->edit(true);
79 }
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 167 of file class.ilPCLoginPageElementGUI.php.

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

References $_POST, and edit().

+ Here is the call graph for this function:

Field Documentation

◆ $obj_definition

ilPCLoginPageElementGUI::$obj_definition
protected

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

Referenced by edit().


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