- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/ui/filter.php
- Класс: Bitrix\Tasks\Ui\Filter
- Вызов: Filter::getPresets
static function getPresets()
{
static $presets = null;
if ($presets === null)
{
/*$uid = \Bitrix\Tasks\Util\User::getId();
if ($uid)
{
if (($uname = \CUser::getById($uid)->fetch()))
{
$uname = \CUser::FormatName(\CSite::GetNameFormat(false), $uname);
}
}*/
$presets = array();
// by statuses
foreach (array('IN_PROGRESS', 'DEFERRED', 'COMPLETED') as $code)
{
$presets['filter_tasks_' . strtolower($code)] = array(
'name' => Loc::getMessage('TASKS_HELPER_FLT_PRESET_' . $code),
'default' => $code == 'IN_PROGRESS',
'fields' => array(
'REAL_STATUS' => static::getMetaStatus($code),
'RESPONSIBLE_ID' => '',
'RESPONSIBLE_ID_name' => '',
'CREATED_BY' => '',
'TITLE' => '',
'DEADLINE' => ''
)
);
}
}
return $presets;
}