ILIAS  release_8 Revision v8.24
ilPCLoginPageElementGUI 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 ilPCLoginPageElementGUI:
+ Collaboration diagram for ilPCLoginPageElementGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
 executeCommand ()
 
 insert ()
 
 edit (bool $a_insert=false)
 
 create ()
 Create new Login Page Element. More...
 
 update ()
 Update Login page element. More...
 
- 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 ()
 
 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 ()
 
 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 Attributes

ilObjectDefinition $obj_definition
 
- Protected Attributes inherited from ilPageContentGUI
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
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 = ""
 
php4DOMDocument $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;"
 
- Protected Member Functions inherited from ilPageContentGUI
 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 
- 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 Class ilLoginPageElementGUI

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om @ilCtrl_Calls ilPCLoginPageElementGUI:

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilPageContentGUI.

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

34 {
35 global $DIC;
36
37 $this->ctrl = $DIC->ctrl();
38 $this->tpl = $DIC["tpl"];
39 $this->lng = $DIC->language();
40 $this->obj_definition = $DIC["objDefinition"];
41 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
42
43 if (!is_object($this->content_obj)) {
44 $this->content_obj = new ilPCLoginPageElement($this->getPage());
45 }
46 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilPageContentGUI\getPage(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCLoginPageElementGUI::create ( )

Create new Login Page Element.

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

130 : void
131 {
132 $this->content_obj = new ilPCLoginPageElement($this->getPage());
133 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
134 $this->content_obj->setLoginPageElementType(
135 $this->request->getString("type")
136 );
137 $this->content_obj->setAlignment(
138 $this->request->getString("horizontal_align")
139 );
140
141 $this->updated = $this->pg_obj->update();
142 if ($this->updated === true) {
143 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
144 } else {
145 $this->insert();
146 }
147 }

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

+ Here is the call graph for this function:

◆ edit()

ilPCLoginPageElementGUI::edit ( bool  $a_insert = false)

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

68 : void
69 {
70 $ilCtrl = $this->ctrl;
73
75
76 // edit form
77 $form = new ilPropertyFormGUI();
78 $form->setFormAction($ilCtrl->getFormAction($this));
79 if ($a_insert) {
80 $form->setTitle($this->lng->txt("cont_insert_login_page"));
81 } else {
82 $form->setTitle($this->lng->txt("cont_update_login_page"));
83 }
84
85 // type selection
86 $type_prop = new ilRadioGroupInputGUI($this->lng->txt("cont_type"), "type");
87
88 foreach (ilPCLoginPageElement::getAllTypes() as $index => $lang_key) {
89 $types[$index] = $this->lng->txt('cont_lpe_' . $lang_key);
90
91 $option = new ilRadioOption($this->lng->txt('cont_lpe_' . $lang_key), $index);
92 $type_prop->addOption($option);
93 }
94
95 $selected = $a_insert
96 ? ""
97 : $this->content_obj->getLoginPageElementType();
98 $type_prop->setValue($selected);
99 $form->addItem($type_prop);
100
101 // horizonal align
102 $align_prop = new ilSelectInputGUI($this->lng->txt("cont_align"), "horizontal_align");
103 $options = array(
104 "Left" => $lng->txt("cont_left"),
105 "Center" => $lng->txt("cont_center"),
106 "Right" => $lng->txt("cont_right"));
107 # "LeftFloat" => $lng->txt("cont_left_float"),
108 # "RightFloat" => $lng->txt("cont_right_float"));
109 $align_prop->setOptions($options);
110 $align_prop->setValue($this->content_obj->getAlignment());
111 $form->addItem($align_prop);
112
113
114 // save/cancel buttons
115 if ($a_insert) {
116 $form->addCommandButton("create_login_page_element", $lng->txt("save"));
117 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
118 } else {
119 $form->addCommandButton("update_login_page_element", $lng->txt("save"));
120 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
121 }
122 $html = $form->getHTML();
123 $tpl->setContent($html);
124 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getAllTypes()
Get all types.
ilGlobalTemplateInterface $tpl
This class represents a property form user interface.
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.
setContent(string $a_html)
Sets content for standard template.
$index
Definition: metadata.php:145

References ilPageContentGUI\$ctrl, $index, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), ilPCLoginPageElement\getAllTypes(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

Referenced by insert(), and update().

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

◆ executeCommand()

ilPCLoginPageElementGUI::executeCommand ( )

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

48 : void
49 {
50 // get next class that processes or forwards current command
51 $next_class = $this->ctrl->getNextClass($this);
52
53 // get current command
54 $cmd = $this->ctrl->getCmd();
55
56 switch ($next_class) {
57 default:
58 $this->$cmd();
59 break;
60 }
61 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ insert()

ilPCLoginPageElementGUI::insert ( )

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

63 : void
64 {
65 $this->edit(true);
66 }

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

152 : void
153 {
154 $this->content_obj->setLoginPageElementType(
155 $this->request->getString("type")
156 );
157 $this->content_obj->setAlignment(
158 $this->request->getString("horizontal_align")
159 );
160 $this->updated = $this->pg_obj->update();
161 if ($this->updated === true) {
162 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
163 } else {
164 $this->pg_obj->addHierIDs();
165 $this->edit();
166 }
167 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $obj_definition

ilObjectDefinition ilPCLoginPageElementGUI::$obj_definition
protected

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


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