本文整理汇总了PHP中ilMail::getMailsOfFolder方法的典型用法代码示例。如果您正苦于以下问题:PHP ilMail::getMailsOfFolder方法的具体用法?PHP ilMail::getMailsOfFolder怎么用?PHP ilMail::getMailsOfFolder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilMail
的用法示例。
在下文中一共展示了ilMail::getMailsOfFolder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMails
/**
* Get Mails
*/
function getMails()
{
global $ilUser;
// BEGIN MAILS
$umail = new ilMail($_SESSION["AccountId"]);
$mbox = new ilMailBox($_SESSION["AccountId"]);
$inbox = $mbox->getInboxFolder();
//SHOW MAILS FOR EVERY USER
$this->mails = $umail->getMailsOfFolder($inbox, array('status' => 'unread', 'type' => 'system'));
}
示例2: getMails
/**
* Get Mails
*/
protected function getMails()
{
global $ilUser;
$umail = new ilMail($ilUser->getId());
$mbox = new ilMailBox($ilUser->getId());
$this->inbox = $mbox->getInboxFolder();
$this->mails = $umail->getMailsOfFolder($this->inbox, array('status' => 'unread', 'type' => 'normal'));
}
示例3: deleteFolder
/**
* add folder
* @param integer id of parent folder
* @access public
*/
function deleteFolder($a_folder_id)
{
global $ilDB;
$query = $ilDB->queryf('
SELECT title FROM mail_obj_data
WHERE obj_id = %s', array('integer'), array($a_folder_id));
$row = $ilDB->fetchAssoc($query);
if (array_key_exists($row['title'], $this->default_folder)) {
return false;
}
include_once "Services/Mail/classes/class.ilMail.php";
$umail = new ilMail($this->user_id);
// SAVE SUBTREE DATA
$subtree = $this->mtree->getSubtree($this->mtree->getNodeData($a_folder_id));
// DELETE ENTRY IN TREE
$this->mtree->deleteTree($this->mtree->getNodeData($a_folder_id));
// DELETE ENTRY IN mobj_data
foreach ($subtree as $node) {
// DELETE mail(s) of folder(s)
$mails = $umail->getMailsOfFolder($node["obj_id"]);
foreach ($mails as $mail) {
$mail_ids[] = $mail["mail_id"];
}
if (is_array($mail_ids)) {
$umail->deleteMails($mail_ids);
}
// DELETE mobj_data entries
$statement = $ilDB->manipulateF('
DELETE FROM ' . $this->table_mail_obj_data . '
WHERE obj_id = %s', array('integer'), array($node['obj_id']));
}
return true;
}