4include_once
'./Services/COPage/classes/class.ilPageContentGUI.php';
5include_once
'./Services/COPage/classes/class.ilPCLoginPageElement.php';
24 public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
26 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
28 if(!is_object($this->content_obj))
40 return $this->lp_elements;
49 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd();
75 public function edit($a_insert =
false)
82 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
84 $form->setFormAction(
$ilCtrl->getFormAction($this));
87 $form->setTitle($this->lng->txt(
"cont_insert_login_page"));
91 $form->setTitle($this->lng->txt(
"cont_update_login_page"));
99 $types[$index] = $this->lng->txt(
'cont_lpe_'.$lang_key);
101 $option =
new ilRadioOption($this->lng->txt(
'cont_lpe_'.$lang_key), $index);
102 $type_prop->addOption($option);
106 $selected = $a_insert
108 : $this->content_obj->getLoginPageElementType();
109 $type_prop->setValue($selected);
110 $form->addItem($type_prop);
113 $align_prop =
new ilSelectInputGUI($this->lng->txt(
"cont_align"),
"horizontal_align");
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"));
121 $align_prop->setValue($this->content_obj->getAlignment());
122 $form->addItem($align_prop);
128 $form->addCommandButton(
"create_login_page_element",
$lng->txt(
"save"));
129 $form->addCommandButton(
"cancelCreate",
$lng->txt(
"cancel"));
133 $form->addCommandButton(
"update_login_page_element",
$lng->txt(
"save"));
134 $form->addCommandButton(
"cancelUpdate",
$lng->txt(
"cancel"));
136 $html = $form->getHTML();
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']);
152 $this->updated = $this->pg_obj->update();
153 if ($this->updated ===
true)
155 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
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)
173 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
177 $this->pg_obj->addHierIDs();
An exception for terminatinating execution or to throw for unit testing.
Class ilLoginPageElementGUI.
insert()
Insert new resources component form.
executeCommand()
execute command
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor @access public.
create()
Create new Login Page Element.
update()
Update Login page element.
edit($a_insert=false)
Edit resources form.
getLoginPageElements()
Get login page elements.
Class ilPCLoginPageElement.
static getAllTypes()
Get all types.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
displayValidationError()
display validation errors
This class represents an option in a radio group.
if(!is_array($argv)) $options