37 $this->
ctrl = $DIC->ctrl();
38 $this->tpl = $DIC[
"tpl"];
39 $this->
lng = $DIC->language();
40 $this->obj_definition = $DIC[
"objDefinition"];
43 if (!is_object($this->content_obj)) {
51 $next_class = $this->
ctrl->getNextClass($this);
54 $cmd = $this->
ctrl->getCmd();
56 switch ($next_class) {
68 public function edit(
bool $a_insert =
false): void
78 $form->setFormAction($ilCtrl->getFormAction($this));
80 $form->setTitle($this->
lng->txt(
"cont_insert_login_page"));
82 $form->setTitle($this->
lng->txt(
"cont_update_login_page"));
89 $types[$index] = $this->
lng->txt(
'cont_lpe_' . $lang_key);
91 $option =
new ilRadioOption($this->
lng->txt(
'cont_lpe_' . $lang_key), $index);
92 $type_prop->addOption($option);
97 : $this->content_obj->getLoginPageElementType();
99 $form->addItem($type_prop);
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")); 110 $align_prop->setValue($this->content_obj->getAlignment());
111 $form->addItem($align_prop);
116 $form->addCommandButton(
"create",
$lng->
txt(
"save"));
117 $form->addCommandButton(
"cancelCreate",
$lng->
txt(
"cancel"));
119 $form->addCommandButton(
"update_login_page_element",
$lng->
txt(
"save"));
120 $form->addCommandButton(
"cancelUpdate",
$lng->
txt(
"cancel"));
122 $html = $form->getHTML();
133 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
134 $this->content_obj->setLoginPageElementType(
135 $this->request->getString(
"type")
137 $this->content_obj->setAlignment(
138 $this->request->getString(
"horizontal_align")
141 $this->updated = $this->pg_obj->update();
142 if ($this->updated ===
true) {
143 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
154 $this->content_obj->setLoginPageElementType(
155 $this->request->getString(
"type")
157 $this->content_obj->setAlignment(
158 $this->request->getString(
"horizontal_align")
160 $this->updated = $this->pg_obj->update();
161 if ($this->updated ===
true) {
162 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
164 $this->pg_obj->addHierIDs();
This class represents an option in a radio group.
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...
ilObjectDefinition $obj_definition
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
setContent(string $a_html)
Sets content for standard template.
static getAllTypes()
Get all types.
Content object of ilPageObject (see ILIAS DTD).
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
setValue(string $a_value)
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
edit(bool $a_insert=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
update()
Update Login page element.
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
create()
Create new Login Page Element.