• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/im/notification/usecase/taskdeleted.php
  • Класс: BitrixTasksIntegrationIMNotificationUseCaseTaskDeleted
  • Вызов: TaskDeleted::getNotification
public function getNotification(Message $message): ?Notification
{
	$task = $message->getMetaData()->getTask();

	if ($task === null)
	{
		return null;
	}

	$title = new NotificationTaskTitle($task);
	$locKey = 'TASKS_TASK_DELETED_MESSAGE_V2';

	$notification = new Notification(
		$locKey,
		$message
	);

	$notification->addTemplate(
		new NotificationTemplate(
			'#TASK_TITLE#',
			$title->getFormatted($message->getRecepient()->getLang())
		)
	);

	return $notification;
}