4 include_once
'./Services/COPage/classes/class.ilPageContentGUI.php';
5 include_once
'./Services/COPage/classes/class.ilPCLoginPageElement.php';
29 public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
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);
39 if (!is_object($this->content_obj)) {
50 return $this->lp_elements;
59 $next_class = $this->ctrl->getNextClass($this);
62 $cmd = $this->ctrl->getCmd();
64 switch ($next_class) {
84 public function edit($a_insert =
false)
94 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
98 $form->setTitle($this->lng->txt(
"cont_insert_login_page"));
100 $form->setTitle($this->lng->txt(
"cont_update_login_page"));
107 $types[
$index] = $this->lng->txt(
'cont_lpe_' . $lang_key);
110 $type_prop->addOption($option);
113 $selected = $a_insert
115 : $this->content_obj->getLoginPageElementType();
117 $form->addItem($type_prop);
120 $align_prop =
new ilSelectInputGUI($this->lng->txt(
"cont_align"),
"horizontal_align");
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);
134 $form->addCommandButton(
"create_login_page_element",
$lng->txt(
"save"));
135 $form->addCommandButton(
"cancelCreate",
$lng->txt(
"cancel"));
137 $form->addCommandButton(
"update_login_page_element",
$lng->txt(
"save"));
138 $form->addCommandButton(
"cancelUpdate",
$lng->txt(
"cancel"));
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']);
156 $this->updated = $this->pg_obj->update();
157 if ($this->updated ===
true) {
158 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
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);
175 $this->pg_obj->addHierIDs();
This class represents an option in a radio group.
getLoginPageElements()
Get login page elements.
executeCommand()
execute command
static getAllTypes()
Get all types.
edit($a_insert=false)
Edit resources form.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
setValue($a_value)
Set Value.
if(isset($_POST['submit'])) $form
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor public.
displayValidationError()
display validation errors
Class ilLoginPageElementGUI.
Create styles array
The data for the language used.
update()
Update Login page element.
Class ilPCLoginPageElement.
create()
Create new Login Page Element.
insert()
Insert new resources component form.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options