◆ __construct()
ilMailFormGUI::__construct |
( |
| ) |
|
Definition at line 27 of file class.ilMailFormGUI.php.
References $_GET, $_POST, $ilCtrl, $ilUser, $lng, and $tpl.
37 $this->mbox =
new ilMailBox($ilUser->getId());
41 $_GET[
'mobj_id'] = $_POST[
'mobj_id'];
44 if(!(
int)
$_GET[
'mobj_id'])
46 $_GET[
'mobj_id'] = $this->mbox->getInboxFolder();
49 $this->ctrl->saveParameter($this,
'mobj_id');
This class handles all operations on files (attachments) in directory ilias_data/mail.
◆ cancelMail()
ilMailFormGUI::cancelMail |
( |
| ) |
|
◆ cancelSearch()
ilMailFormGUI::cancelSearch |
( |
| ) |
|
◆ decodeAttachmentFiles()
ilMailFormGUI::decodeAttachmentFiles |
( |
array |
$files | ) |
|
|
protected |
- Parameters
-
- Returns
- array
Definition at line 114 of file class.ilMailFormGUI.php.
References $GLOBALS.
Referenced by saveDraft(), and sendMessage().
116 $decodedFiles = array();
118 foreach($files as $value)
120 if(is_file($this->mfile->getMailPath() .
'/' .
$GLOBALS[
'ilUser']->getId() .
'_' . urldecode($value)))
122 $decodedFiles[] = urldecode($value);
126 return $decodedFiles;
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
◆ editAttachments()
ilMailFormGUI::editAttachments |
( |
| ) |
|
◆ executeCommand()
ilMailFormGUI::executeCommand |
( |
| ) |
|
Definition at line 52 of file class.ilMailFormGUI.php.
References $cmd.
54 $forward_class = $this->ctrl->getNextClass($this);
55 switch($forward_class)
57 case 'ilmailfoldergui':
58 include_once
'Services/Mail/classes/class.ilMailFolderGUI.php';
63 case 'ilmailattachmentgui':
64 include_once
'Services/Mail/classes/class.ilMailAttachmentGUI.php';
66 $this->ctrl->setReturn($this,
"returnFromAttachments");
70 case 'ilmailsearchgui':
71 include_once
'Services/Contact/classes/class.ilMailSearchGUI.php';
73 $this->ctrl->setReturn($this,
"searchResults");
77 case 'ilmailsearchcoursesgui':
78 include_once
'Services/Contact/classes/class.ilMailSearchCoursesGUI.php';
80 $this->ctrl->setReturn($this,
"searchResults");
84 case 'ilmailinglistsgui':
85 include_once
'Services/Contact/classes/class.ilMailingListsGUI.php';
87 $this->ctrl->setReturn($this,
'searchResults');
91 case 'ilmailsearchgroupsgui':
92 include_once
'Services/Contact/classes/class.ilMailSearchGroupsGUI.php';
94 $this->ctrl->setReturn($this,
"searchResults");
99 if (!(
$cmd = $this->ctrl->getCmd()))
◆ getAjaxPlaceholdersById()
ilMailFormGUI::getAjaxPlaceholdersById |
( |
| ) |
|
Definition at line 892 of file class.ilMailFormGUI.php.
References $_GET, exit, ilMailTemplateService\getTemplateContextById(), and ilUtil\stripSlashes().
895 require_once
'Services/Mail/classes/class.ilMailTemplateService.php';
896 require_once
'Services/Mail/classes/Form/class.ilManualPlaceholderInputGUI.php';
899 foreach($context->getPlaceholders() as $key => $value)
901 $placeholders->addPlaceholder($value[
'placeholder'], $value[
'label'] );
903 $placeholders->render(
true);
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getTemplateContextById($a_id)
◆ getTemplateDataById()
ilMailFormGUI::getTemplateDataById |
( |
| ) |
|
|
protected |
Called asynchronously when changing the template.
Definition at line 416 of file class.ilMailFormGUI.php.
References $_GET, $_POST, $_SESSION, $data, $ilCtrl, $ilUser, $lng, $options, $size, $template_id, ilManualPlaceholderInputGUI\addPlaceholder(), ilButton\BUTTON_TYPE_SUBMIT, ilJsonUtil\encode(), exit, ilFormat\formatSize(), ilMailFormCall\getContextId(), ilButton\getInstance(), ilLoggerFactory\getLogger(), ilMailFormCall\getSignature(), ilMailTemplateService\getTemplateContextById(), ilMailFormCall\isRefererStored(), ilUtil\securePlainString(), ilUtil\sendInfo(), ilMailFormCall\setContextId(), ilMailFormCall\setContextParameters(), ilFormPropertyGUI\setInfo(), ilCheckboxInputGUI\setOptionTitle(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), and ilTextAreaInputGUI\setValue().
418 require_once
'Services/JSON/classes/class.ilJsonUtil.php';
420 if(!isset(
$_GET[
'template_id']))
427 require_once
'Services/Mail/classes/class.ilMailTemplateService.php';
428 require_once
'Services/Mail/classes/class.ilMailTemplateDataProvider.php';
431 $template = $template_provider->getTemplateById(
$template_id);
434 'm_subject' => $template->getSubject(),
435 'm_message' => $template->getMessage()
Class ilMailTemplateDataProvider.
static encode($mixed, $suppress_native=false)
static getTemplateContextById($a_id)
◆ lookupRecipientAsync()
ilMailFormGUI::lookupRecipientAsync |
( |
| ) |
|
Definition at line 813 of file class.ilMailFormGUI.php.
References $_REQUEST, $result, ilJsonUtil\encode(), exit, and ilUtil\stripSlashes().
815 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
816 include_once
'Services/Mail/classes/class.ilMailForm.php';
828 $quoted = str_replace(
'%',
'\%', $quoted);
829 $quoted = str_replace(
'_',
'\_', $quoted);
static encode($mixed, $suppress_native=false)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ mailAttachment()
ilMailFormGUI::mailAttachment |
( |
| ) |
|
◆ mailRole()
ilMailFormGUI::mailRole |
( |
| ) |
|
◆ mailUser()
ilMailFormGUI::mailUser |
( |
| ) |
|
◆ replyMail()
ilMailFormGUI::replyMail |
( |
| ) |
|
◆ returnFromAttachments()
ilMailFormGUI::returnFromAttachments |
( |
| ) |
|
◆ saveDraft()
ilMailFormGUI::saveDraft |
( |
| ) |
|
Definition at line 177 of file class.ilMailFormGUI.php.
References $_POST, $_SESSION, $GLOBALS, decodeAttachmentFiles(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilMailFormCall\getRefererRedirectUrl(), ilMailFormCall\isRefererStored(), ilUtil\redirect(), ilUtil\securePlainString(), and ilUtil\sendInfo().
181 $_POST[
'm_subject'] =
'No title';
184 $draftFolderId = $this->mbox->getDraftsFolder();
187 if($errorMessage = $this->umail->validateRecipients(
193 $_POST[
'attachments'] = $files;
206 $draftId = $this->umail->getNewDraftId(
$GLOBALS[
'ilUser']->getId(), $draftFolderId);
209 $this->umail->updateDraft($draftFolderId, $files,
218 (
int)
$_POST[
'use_placeholders'],
228 $this->ctrl->redirectByClass(
"ilmailfoldergui");
static securePlainString($a_str)
Remove unsecure characters from a plain text string.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
static redirect($a_script)
http redirect to other script
◆ search()
ilMailFormGUI::search |
( |
| ) |
|
Definition at line 317 of file class.ilMailFormGUI.php.
References $_POST, $_SESSION, searchUsers(), and ilUtil\sendInfo().
320 if(strlen(trim(
$_SESSION[
"mail_search_search"])) == 0)
327 if(strlen(trim(
$_SESSION[
"mail_search_search"])) < 3)
329 $this->lng->loadLanguageModule(
'search');
335 $this->ctrl->setParameterByClass(
"ilmailsearchgui",
"search", urlencode(
$_SESSION[
"mail_search_search"]));
336 $this->ctrl->redirectByClass(
"ilmailsearchgui");
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ searchCoursesTo()
ilMailFormGUI::searchCoursesTo |
( |
| ) |
|
Definition at line 293 of file class.ilMailFormGUI.php.
References $_SESSION.
295 $this->saveMailBeforeSearch();
299 $this->ctrl->setParameterByClass(
'ilmailsearchcoursesgui',
'cmd',
'showMembers');
302 $this->ctrl->setParameterByClass(
'ilmailsearchcoursesgui',
'ref',
'mail');
303 $this->ctrl->redirectByClass(
'ilmailsearchcoursesgui');
◆ searchGroupsTo()
ilMailFormGUI::searchGroupsTo |
( |
| ) |
|
Definition at line 309 of file class.ilMailFormGUI.php.
311 $this->saveMailBeforeSearch();
313 $this->ctrl->setParameterByClass(
'ilmailsearchgroupsgui',
'ref',
'mail');
314 $this->ctrl->redirectByClass(
'ilmailsearchgroupsgui');
◆ searchMailingListsTo()
ilMailFormGUI::searchMailingListsTo |
( |
| ) |
|
Definition at line 884 of file class.ilMailFormGUI.php.
886 $this->saveMailBeforeSearch();
888 $this->ctrl->setParameterByClass(
'ilmailinglistsgui',
'ref',
'mail');
889 $this->ctrl->redirectByClass(
'ilmailinglistsgui');
◆ searchResults()
ilMailFormGUI::searchResults |
( |
| ) |
|
◆ searchUsers()
ilMailFormGUI::searchUsers |
( |
|
$save = true | ) |
|
Definition at line 233 of file class.ilMailFormGUI.php.
References $_POST, $_SESSION, $ilCtrl, $ilUser, ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilUtil\prepareFormOutput(), ilUtil\securePlainString(), and ilTextInputGUI\setSize().
Referenced by search().
237 $this->tpl->setTitle($this->lng->txt(
"mail"));
243 if(is_array(
$_POST[
'attachments']))
245 foreach(
$_POST[
'attachments'] as $value)
247 $files[] = urldecode($value);
252 $this->umail->savePostData($ilUser->getId(),
266 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
268 $form->setId(
'search_rcp');
269 $form->setTitle($this->lng->txt(
'search_recipients'));
270 $form->setFormAction($ilCtrl->getFormAction($this,
'search'));
272 $inp =
new ilTextInputGUI($this->lng->txt(
"search_for"),
'search');
274 $dsDataLink = $ilCtrl->getLinkTarget($this,
'lookupRecipientAsync',
'',
true,
false);
275 $inp->setDataSource($dsDataLink);
277 if (strlen(trim(
$_SESSION[
"mail_search_search"])) > 0)
281 $form->addItem($inp);
283 $form->addCommandButton(
'search', $this->lng->txt(
"search"));
284 $form->addCommandButton(
'cancelSearch', $this->lng->txt(
"cancel"));
286 $this->tpl->setContent($form->getHtml());
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static securePlainString($a_str)
Remove unsecure characters from a plain text string.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
◆ sendMessage()
ilMailFormGUI::sendMessage |
( |
| ) |
|
Definition at line 129 of file class.ilMailFormGUI.php.
References $_POST, $ilUser, decodeAttachmentFiles(), ilMailFormCall\getRefererRedirectUrl(), ilMailFormCall\isRefererStored(), ilUtil\redirect(), ilUtil\securePlainString(), ilUtil\sendInfo(), and ilUtil\stripSlashes().
136 $message = str_replace(
"\r",
'', $message);
138 $message = $this->umail->formatLinebreakMessage($message);
140 $this->umail->setSaveInSentbox(
true);
142 $m_type = isset(
$_POST[
"m_type"]) ?
$_POST[
"m_type"] : array(
"normal");
145 if($errorMessage = $this->umail->sendMail(
152 (
int)
$_POST[
'use_placeholders']
156 $_POST[
'attachments'] = $files;
161 $this->umail->savePostData($ilUser->getId(), array(),
"",
"",
"",
"",
"",
"",
"",
"");
163 $this->ctrl->setParameterByClass(
'ilmailgui',
'type',
'message_sent');
171 $this->ctrl->redirectByClass(
'ilmailgui');
static securePlainString($a_str)
Remove unsecure characters from a plain text string.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static redirect($a_script)
http redirect to other script
◆ $ctrl
ilMailFormGUI::$ctrl = null |
|
private |
◆ $lng
ilMailFormGUI::$lng = null |
|
private |
◆ $mbox
ilMailFormGUI::$mbox = null |
|
private |
◆ $mfile
ilMailFormGUI::$mfile = null |
|
private |
◆ $tpl
ilMailFormGUI::$tpl = null |
|
private |
◆ $umail
ilMailFormGUI::$umail = null |
|
private |
The documentation for this class was generated from the following file: