• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/im/notification/task/title.php
  • Класс: BitrixTasksIntegrationIMNotificationTaskTitle
  • Вызов: Title::getFormatted
public function getFormatted(?string $lang = null): string
{
	$name = '[#' . $this->task->getId() . '] ';

	if ($this->bUrl)
	{
		$name .= '[URL=#PATH_TO_TASK#]';
	}

	$name .= $this->task->getTitle();

	if ($this->bUrl)
	{
		$name .= '[/URL]';
	}

	if ($this->task->getGroupId() && CModule::IncludeModule('socialnetwork'))
	{
		$group = GroupRegistry::getInstance()->get($this->task->getGroupId());
		if (isset($group['NAME']))
		{
			$decodedName = BitrixMainTextEmoji::decode($group['NAME']);
			$text = Loc::getMessage('TASKS_NOTIFICATIONS_IN_GROUP', null, $lang) . ' ' . $decodedName;
			$name .= ' (' . $text . ')';
		}
	}

	return $name;
}