26 protected \ILIAS\HTTP\Services
$http;
37 $this->tpl = $DIC[
"tpl"];
38 $this->
ctrl = $DIC->ctrl();
39 $this->
toolbar = $DIC->toolbar();
40 $this->
http = $DIC->http();
47 $next_class = $this->
ctrl->getNextClass($this);
50 $cmd = $this->
ctrl->getCmd();
52 switch ($next_class) {
97 $is_template = ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder"));
101 $this->
lng->txt(
"cont_edit_personal_data"),
102 $ilCtrl->getLinkTargetByClass(
"ildashboardgui",
"jumptoprofile"),
108 $lng_suffix =
"_template";
112 $form->setFormAction($ilCtrl->getFormAction($this));
114 $form->setTitle($this->
lng->txt(
"cont_insert_profile"));
116 $form->setTitle($this->
lng->txt(
"cont_update_profile"));
120 $form->addItem($mode);
122 $mode_inherit =
new ilRadioOption($this->
lng->txt(
"cont_profile_mode_inherit"),
"inherit");
123 $mode_inherit->
setInfo($this->
lng->txt(
"cont_profile_mode" . $lng_suffix .
"_inherit_info"));
124 $mode->addOption($mode_inherit);
126 $mode_manual =
new ilRadioOption($this->
lng->txt(
"cont_profile_mode_manual"),
"manual");
127 $mode_manual->
setInfo($this->
lng->txt(
"cont_profile_mode_manual_info"));
128 $mode->addOption($mode_manual);
132 $mode->setValue(
"inherit");
134 $mode_value = $this->content_obj->getMode();
135 $mode->setValue($mode_value);
138 if ($mode_value ==
"manual") {
139 foreach ($this->content_obj->getFields() as
$name) {
140 $prefs[
"public_" .
$name] =
"y";
146 $profile->showPublicProfileFields($form, $prefs, $mode_manual, $is_template);
149 $form->addCommandButton(
"create_profile", $this->
lng->txt(
"save"));
150 $form->addCommandButton(
"cancelCreate", $this->
lng->txt(
"cancel"));
152 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
153 $form->addCommandButton(
"cancelUpdate", $this->
lng->txt(
"cancel"));
165 foreach ($this->
http->request()->getParsedBody() as
$name => $value) {
166 if (substr($name, 0, 4) ==
"chk_") {
168 $fields[] = substr($name, 4);
181 if ($form->checkInput()) {
183 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
184 $this->content_obj->setFields(
185 $form->getInput(
"mode"),
188 $this->updated = $this->pg_obj->update();
189 if ($this->updated ===
true) {
190 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
203 if ($form->checkInput()) {
204 $this->content_obj->setFields(
205 $form->getInput(
"mode"),
208 $this->updated = $this->pg_obj->update();
209 if ($this->updated ===
true) {
210 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
214 $this->pg_obj->addHierIDs();
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
create()
Create new personal data.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
insert(ilPropertyFormGUI $a_form=null)
Insert new personal data form.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
static http()
Fetches the global http state from ILIAS.
initForm(bool $a_insert=false)
Init profile form.
getFieldsValues()
Gather field values.
setContent(string $a_html)
Sets content for standard template.
ILIAS HTTP Services $http
edit(ilPropertyFormGUI $a_form=null)
Edit personal data form.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
update()
Update personal data.
__construct(Container $dic, ilPlugin $plugin)