- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/classes/general/tasknotifications.php
- Класс: CTaskNotifications
- Вызов: CTaskNotifications::sendExpiredMessageForResponsible
static function sendExpiredMessageForResponsible(array $taskData, array $parameters): void
{
$createdBy = (int)$taskData['CREATED_BY'];
$responsibleId = (int)$taskData['RESPONSIBLE_ID'];
$sameCreatorMessagePart = 'SAME_CREATOR_';
$title = self::formatTaskName($taskData['ID'], $taskData['TITLE'], $taskData['GROUP_ID']);
$messageKey = (
$responsibleId === $createdBy
? "TASKS_TASK_EXPIRED_RESPONSIBLE_{$sameCreatorMessagePart}MESSAGE"
: "TASKS_TASK_EXPIRED_RESPONSIBLE_MESSAGE"
);
$messages = [
'INSTANT' => str_replace(['#TASK_TITLE#'], [$title], self::getGenderMessage(0, $messageKey)),
'EMAIL' => str_replace(['#TASK_TITLE#'], [strip_tags($title)], self::getGenderMessage(0, $messageKey)),
'PUSH' => self::makePushMessage($messageKey, $createdBy, $taskData),
];
self::sendMessageEx($taskData['ID'], $createdBy, [$responsibleId], $messages, $parameters);
}