ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 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
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;"
 
- 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="")
 
- 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 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 = "" 
)

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

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

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  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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.

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

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  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ edit()

ilPCLoginPageElementGUI::edit ( bool  $a_insert = false)

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

References ilPageContentGUI\$ctrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), ilPCLoginPageElement\getAllTypes(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\setContent(), ilSelectInputGUI\setOptions(), ilRadioOption\setValue(), and ilLanguage\txt().

Referenced by insert(), and update().

68  : void
69  {
70  $ilCtrl = $this->ctrl;
71  $tpl = $this->tpl;
72  $lng = $this->lng;
73 
74  $this->displayValidationError();
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", $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  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
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...
setContent(string $a_html)
Sets content for standard template.
static getAllTypes()
Get all types.
setOptions(array $a_options)
This class represents a property in a property form.
setValue(string $a_value)
ilGlobalTemplateInterface $tpl
+ 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.

References ILIAS\Repository\ctrl().

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  }
+ Here is the call graph for this function:

◆ insert()

ilPCLoginPageElementGUI::insert ( )

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

References edit().

Referenced by create().

63  : void
64  {
65  $this->edit(true);
66  }
+ 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.

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

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  }
+ 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: