ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMailOptionsGUI Class Reference
+ Collaboration diagram for ilMailOptionsGUI:

Public Member Functions

 __construct ()
 ilMailOptionsGUI constructor. More...
 
 executeCommand ()
 
 saveOptions ()
 Called if the user pushes the submit button of the mail options form. More...
 
 showOptions (ilMailOptionsFormGUI $form=null)
 Called to display the mail options form. More...
 

Protected Member Functions

 getForm ()
 

Private Attributes

 $tpl
 
 $ctrl
 
 $lng
 
 $settings
 
 $user
 
 $umail
 
 $mbox
 

Detailed Description

Author
Jens Conze
Version
$Id$

Definition at line 15 of file class.ilMailOptionsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMailOptionsGUI::__construct ( )

ilMailOptionsGUI constructor.

Definition at line 55 of file class.ilMailOptionsGUI.php.

56 {
57 global $DIC;
58
59 $this->tpl = $DIC->ui()->mainTemplate();
60 $this->ctrl = $DIC->ctrl();
61 $this->settings = $DIC->settings();
62 $this->lng = $DIC->language();
63 $this->user = $DIC->user();
64
65 $this->lng->loadLanguageModule('mail');
66
67 $this->ctrl->saveParameter($this, 'mobj_id');
68
69 $this->umail = new ilFormatMail($this->user->getId());
70 $this->mbox = new ilMailBox($this->user->getId());
71 }
user()
Definition: user.php:4
Class UserMail this class handles user mails.
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilMailOptionsGUI::executeCommand ( )

Definition at line 73 of file class.ilMailOptionsGUI.php.

74 {
75 $nextClass = $this->ctrl->getNextClass($this);
76 switch ($nextClass) {
77 default:
78 if (!($cmd = $this->ctrl->getCmd())) {
79 $cmd = 'showOptions';
80 }
81
82 $this->$cmd();
83 break;
84 }
85 }

◆ getForm()

ilMailOptionsGUI::getForm ( )
protected
Returns
ilMailOptionsFormGUI

Definition at line 90 of file class.ilMailOptionsGUI.php.

91 {
92 return new ilMailOptionsFormGUI(
93 new ilMailOptions($this->user->getId()),
94 $this,
95 'saveOptions'
96 );
97 }
Class ilMailOptionsFormGUI.
Class ilMailOptions this class handles user mails.

References user().

Referenced by saveOptions(), and showOptions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveOptions()

ilMailOptionsGUI::saveOptions ( )

Called if the user pushes the submit button of the mail options form.

Passes the post data to the mail options model instance to store them.

Definition at line 103 of file class.ilMailOptionsGUI.php.

104 {
105 $this->tpl->setTitle($this->lng->txt('mail'));
106
107 $form = $this->getForm();
108 if ($form->save()) {
109 ilUtil::sendSuccess($this->lng->txt('mail_options_saved'));
110 }
111
112 $this->showOptions($form);
113 }
showOptions(ilMailOptionsFormGUI $form=null)
Called to display the mail options form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(isset($_POST['submit'])) $form

References $form, getForm(), ilUtil\sendSuccess(), and showOptions().

+ Here is the call graph for this function:

◆ showOptions()

ilMailOptionsGUI::showOptions ( ilMailOptionsFormGUI  $form = null)

Called to display the mail options form.

Parameters
$formilMailOptionsFormGUI|null

Definition at line 119 of file class.ilMailOptionsGUI.php.

120 {
121 if (null === $form) {
122 $form = $this->getForm();
123 $form->populate();
124 } else {
125 $form->setValuesByPost();
126 }
127
128 $this->tpl->setContent($form->getHTML());
129 $this->tpl->show();
130 }

References $form, and getForm().

Referenced by saveOptions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilMailOptionsGUI::$ctrl
private

Definition at line 25 of file class.ilMailOptionsGUI.php.

◆ $lng

ilMailOptionsGUI::$lng
private

Definition at line 30 of file class.ilMailOptionsGUI.php.

◆ $mbox

ilMailOptionsGUI::$mbox
private

Definition at line 50 of file class.ilMailOptionsGUI.php.

◆ $settings

ilMailOptionsGUI::$settings
private

Definition at line 35 of file class.ilMailOptionsGUI.php.

◆ $tpl

ilMailOptionsGUI::$tpl
private

Definition at line 20 of file class.ilMailOptionsGUI.php.

◆ $umail

ilMailOptionsGUI::$umail
private

Definition at line 45 of file class.ilMailOptionsGUI.php.

◆ $user

ilMailOptionsGUI::$user
private

Definition at line 40 of file class.ilMailOptionsGUI.php.


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