ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilUserProfileInfoSettingsGUI Class Reference

User profile info settings UI class. More...

+ Collaboration diagram for ilUserProfileInfoSettingsGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 show ()
 Show settings. More...
 
 initForm ()
 Init form. More...
 
 save ()
 Save. More...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $lng
 

Detailed Description

User profile info settings UI class.

Author
Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

@ilCtrl_Calls ilUserProfileInfoSettingsGUI:

Definition at line 16 of file class.ilUserProfileInfoSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserProfileInfoSettingsGUI::__construct ( )

Constructor.

Definition at line 36 of file class.ilUserProfileInfoSettingsGUI.php.

37 {
38 global $DIC;
39
40 $this->ctrl = $DIC->ctrl();
41 $this->tpl = $DIC["tpl"];
42 $this->lng = $DIC->language();
43 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ executeCommand()

ilUserProfileInfoSettingsGUI::executeCommand ( )

Execute command.

Definition at line 49 of file class.ilUserProfileInfoSettingsGUI.php.

50 {
51 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd("show");
53
54 switch ($next_class) {
55 default:
56 if (in_array($cmd, array("show", "save"))) {
57 $this->$cmd();
58 }
59 }
60 }

◆ initForm()

ilUserProfileInfoSettingsGUI::initForm ( )

Init form.

Returns
ilPropertyFormGUI

Definition at line 77 of file class.ilUserProfileInfoSettingsGUI.php.

78 {
81
82 $lng->loadLanguageModule("meta");
83
84 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
86
87 $setting = new ilSetting("user");
88
89 $first = true;
90 foreach ($lng->getInstalledLanguages() as $l) {
91 // info text
92 include_once("Services/Form/classes/class.ilTextAreaInputGUI.php");
93 $ti = new ilTextAreaInputGUI($lng->txt("meta_l_" . $l), "user_profile_info_text_" . $l);
94 $ti->setRows(7);
95 if ($first) {
96 $ti->setInfo($lng->txt("user_profile_info_text_info"));
97 }
98 $first = false;
99 $ti->setValue($setting->get("user_profile_info_" . $l));
100 $form->addItem($ti);
101 }
102
103 $form->addCommandButton("save", $lng->txt("save"));
104
105 $form->setTitle($lng->txt("user_profile_info"));
106 $form->setFormAction($ctrl->getFormAction($this));
107
108 return $form;
109 }
global $l
Definition: afr.php:30
This class represents a property form user interface.
ILIAS Setting Class.
This class represents a text area property in a property form.
if(isset($_POST['submit'])) $form

References $ctrl, $form, $l, and $lng.

Referenced by save(), and show().

+ Here is the caller graph for this function:

◆ save()

ilUserProfileInfoSettingsGUI::save ( )

Save.

Definition at line 114 of file class.ilUserProfileInfoSettingsGUI.php.

115 {
119
120 $form = $this->initForm();
121 if ($form->checkInput()) {
122 $setting = new ilSetting("user");
123 foreach ($lng->getInstalledLanguages() as $l) {
124 $setting->set("user_profile_info_" . $l, $form->getInput("user_profile_info_text_" . $l));
125 }
126
127 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
128 $ctrl->redirect($this, "show");
129 } else {
130 $form->setValuesByPost();
131 $tpl->setContent($form->getHtml());
132 }
133 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ctrl, $form, $l, $lng, $tpl, initForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ show()

ilUserProfileInfoSettingsGUI::show ( )

Show settings.

Definition at line 65 of file class.ilUserProfileInfoSettingsGUI.php.

66 {
68
69 $form = $this->initForm();
70 $tpl->setContent($form->getHTML());
71 }

References $form, $tpl, and initForm().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilUserProfileInfoSettingsGUI::$ctrl
protected

Definition at line 21 of file class.ilUserProfileInfoSettingsGUI.php.

Referenced by initForm(), and save().

◆ $lng

ilUserProfileInfoSettingsGUI::$lng
protected

Definition at line 31 of file class.ilUserProfileInfoSettingsGUI.php.

Referenced by initForm(), and save().

◆ $tpl

ilUserProfileInfoSettingsGUI::$tpl
protected

Definition at line 26 of file class.ilUserProfileInfoSettingsGUI.php.

Referenced by save(), and show().


The documentation for this class was generated from the following file: