ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMailOptionsGUI Class Reference
+ Collaboration diagram for ilMailOptionsGUI:

Public Member Functions

 __construct ()
 executeCommand ()
 saveOptions ()
 showOptions ()

Private Attributes

 $tpl = null
 $ctrl = null
 $lng = null
 $umail = null
 $mbox = null
 $errorDelete = false

Detailed Description

Author
Jens Conze
Version
$Id$

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

Constructor & Destructor Documentation

ilMailOptionsGUI::__construct ( )

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

References $ilCtrl, $lng, and $tpl.

{
global $tpl, $ilCtrl, $lng, $ilUser;
$this->tpl = $tpl;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->ctrl->saveParameter($this, "mobj_id");
$this->umail = new ilFormatMail($ilUser->getId());
$this->mbox = new ilMailBox($ilUser->getId());
}

Member Function Documentation

ilMailOptionsGUI::executeCommand ( )

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

References $cmd.

{
$forward_class = $this->ctrl->getNextClass($this);
switch($forward_class)
{
default:
if (!($cmd = $this->ctrl->getCmd()))
{
$cmd = "showOptions";
}
$this->$cmd();
break;
}
return true;
}
ilMailOptionsGUI::saveOptions ( )

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

References ilUtil\sendInfo(), showOptions(), and ilUtil\stripSlashes().

{
$this->umail->mail_options->updateOptions(ilUtil::stripSlashes($_POST["signature"]), ilUtil::stripSlashes((int) $_POST["linebreak"]), ilUtil::stripSlashes((int) $_POST["incoming_type"]), ilUtil::stripSlashes((int) $_POST['cronjob_notification']));
# ilUtil::sendInfo($this->lng->txt("mail_options_saved"),true);
# $this->ctrl->redirectByClass("ilmailfoldergui");
ilUtil::sendInfo($this->lng->txt("mail_options_saved"));
$this->showOptions();
}

+ Here is the call graph for this function:

ilMailOptionsGUI::showOptions ( )

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

References ilObjUser\_lookupEmail().

Referenced by saveOptions().

{
global $ilUser, $ilias;
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.mail_options.html", "Services/Mail");
$this->tpl->setVariable("HEADER", $this->lng->txt("mail"));
// FORM GLOBAL OPTIONS
$this->tpl->setCurrentBlock("options");
// BEGIN INCOMING
$this->tpl->setCurrentBlock("option_inc_line");
$inc = array($this->lng->txt("mail_incoming_local"),$this->lng->txt("mail_incoming_smtp"),$this->lng->txt("mail_incoming_both"));
foreach($inc as $key => $option)
{
$this->tpl->setVariable("OPTION_INC_VALUE",$key);
$this->tpl->setVariable("OPTION_INC_NAME",$option);
$this->tpl->setVariable("OPTION_INC_SELECTED",$this->umail->mail_options->getIncomingType() == $key ? "selected=\"selected\"" : "");
$this->tpl->parseCurrentBlock();
}
// BEGIN LINEBREAK_OPTIONS
$this->tpl->setCurrentBlock("option_line");
$linebreak = $this->umail->mail_options->getLinebreak();
for($i = 50; $i <= 80;$i++)
{
$this->tpl->setVariable("OPTION_VALUE",$i);
$this->tpl->setVariable("OPTION_NAME",$i);
if( $i == $linebreak)
{
$this->tpl->setVariable("OPTION_SELECTED","selected");
}
$this->tpl->parseCurrentBlock();
}
if(!strlen(ilObjUser::_lookupEmail($ilUser->getId())))
{
$this->tpl->setVariable('INC_DISABLED','disabled="disabled"');
}
$this->tpl->setVariable("GLOBAL_OPTIONS",$this->lng->txt("mail_global_options"));
$this->tpl->setVariable("TXT_INCOMING", $this->lng->txt("mail_incoming"));
$this->tpl->setVariable("TXT_LINEBREAK", $this->lng->txt("linebreak"));
$this->tpl->setVariable("TXT_SIGNATURE", $this->lng->txt("signature"));
$this->tpl->setVariable("CONTENT",$this->umail->mail_options->getSignature());
if ($ilias->getSetting("mail_notification"))
{
$this->tpl->setVariable("TXT_CRONJOB_NOTIFICATION", $this->lng->txt("cron_mail_notification"));
$this->tpl->setVariable("TXT_CRONJOB_NOTIFICATION_INFO", $this->lng->txt("mail_cronjob_notification_info"));
if ($this->umail->mail_options->getCronjobNotification())
{
$this->tpl->setVariable("CRONJOB_NOTIFICATION_SELECTED", " checked=\"checked\"");
}
}
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->ctrl->setParameter($this, "cmd", "post");
$this->tpl->setVariable("ACTION", $this->ctrl->getFormAction($this, 'saveOptions'));
$this->ctrl->clearParameters($this);
$this->tpl->parseCurrentBlock();
$this->tpl->show();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilMailOptionsGUI::$ctrl = null
private

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

ilMailOptionsGUI::$errorDelete = false
private

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

ilMailOptionsGUI::$lng = null
private

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

Referenced by __construct().

ilMailOptionsGUI::$mbox = null
private

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

ilMailOptionsGUI::$tpl = null
private

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

Referenced by __construct().

ilMailOptionsGUI::$umail = null
private

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


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