- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/classes/general/tasknotifications.php
- Класс: CTaskNotifications
- Вызов: CTaskNotifications::sendExpiredSoonMessage
static function sendExpiredSoonMessage(array $taskData): void
{
if (self::useNewNotifications())
{
$task = BitrixTasksInternalsRegistryTaskRegistry::getInstance()->getObject($taskData['ID'], true);
if (!$task)
{
return;
}
$controller = new BitrixTasksInternalsNotificationController();
$controller->onTaskExpiresSoon($task, $taskData);
$controller->push();
return;
}
$cacheWasEnabled = self::enableStaticCache();
$parameters = [
'ENTITY_CODE' => 'TASK',
'ENTITY_OPERATION' => 'EXPIRED_SOON',
'EVENT_DATA' => [
'ACTION' => 'TASK_EXPIRED_SOON',
'arFields' => $taskData,
],
'NOTIFY_EVENT' => 'task_expired_soon'
];
self::sendExpiredSoonMessageForResponsible($taskData, $parameters);
self::sendExpiredSoonMessageForAccomplices($taskData, $parameters);
if ($cacheWasEnabled)
{
self::disableStaticCache();
}
}