• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/im/notification/task/pushnotification.php
  • Класс: BitrixTasksIntegrationIMNotificationTaskPushNotification
  • Вызов: PushNotification::prepareTemplates
private function prepareTemplates(array $templates): array
{
	$pushTemplates = [];

	// TODO: get rid of CUser, CSite
	$formatedUserName = CUser::FormatName(CSite::GetNameFormat(false), $this->notification->getSender()->toArray());

	$pushTemplates[] = new NotificationTemplate('USER_NAME', $formatedUserName);

	foreach ($templates as $template)
	{
		$pushTemplates[] = new NotificationTemplate(
			str_replace('#', '', $template->getSearch()),
			$template->getReplace()
		);
	}

	return $pushTemplates;
}