• Модуль: mail
  • Путь к файлу: ~/bitrix/modules/mail/lib/helper/mailbox.php
  • Класс: BitrixMailHelperMailbox
  • Вызов: Mailbox::getFilters
public function getFilters($force = false)
{
	if (is_null($this->filters) || $force)
	{
		$this->filters = MailMailFilterTable::getList(array(
			'filter' => ORMQueryQuery::filter()
				->where('ACTIVE', 'Y')
				->where(
					ORMQueryQuery::filter()->logic('or')
						->where('MAILBOX_ID', $this->mailbox['ID'])
						->where('MAILBOX_ID', null)
				),
			'order' => array(
				'SORT' => 'ASC',
				'ID' => 'ASC',
			),
		))->fetchAll();

		foreach ($this->filters as $k => $item)
		{
			$this->filters[$k]['__actions'] = array();

			$res = CMailFilter::getFilterList($item['ACTION_TYPE']);
			while ($row = $res->fetch())
			{
				$this->filters[$k]['__actions'][] = $row;
			}
		}
	}

	return $this->filters;
}