- Модуль: mail
- Путь к файлу: ~/bitrix/modules/mail/lib/internals/mailboxdirectorystorage.php
- Класс: BitrixMailInternalsMailboxDirectoryStorage
- Вызов: MailboxDirectoryStorage::group
private function group($items)
{
$all = [];
$income = [];
$outcome = [];
$spam = [];
$trash = [];
$draft = [];
$hashed = [];
foreach ($items as $item)
{
$all[$item->getPath()] = $item;
$hashed[$item->getDirMd5()] = $item;
if ($item->isIncome())
{
$income[] = $item;
}
if ($item->isOutcome())
{
$outcome[] = $item;
}
if ($item->isSpam())
{
$spam[] = $item;
}
if ($item->isDraft())
{
$draft[] = $item;
}
if ($item->isTrash())
{
$trash[] = $item;
}
}
$this->reset();
$this->setData('all', $all);
$this->setData('income', $income);
$this->setData('outcome', $outcome);
$this->setData('spam', $spam);
$this->setData('trash', $trash);
$this->setData('draft', $draft);
$this->setData('hashed', $hashed);
}