• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Timeline/Item/Activity/Call.php
  • Класс: Bitrix\Crm\Service\Timeline\Item\Activity\Call
  • Вызов: Call::getTitle
public function getTitle(): string
{
	switch ($this->fetchDirection())
	{
		case CCrmActivityDirection::Incoming:
			if ($this->isMissedCall())
			{
				return Loc::getMessage(
					$this->isScheduled()
						? 'CRM_TIMELINE_TITLE_CALL_MISSED'
						: 'CRM_TIMELINE_TITLE_CALL_INCOMING_DONE'
				);
			}

			// set call end time to correct title in header
			if ($this->isScheduled())
			{
				$userTime = (string)$this->getAssociatedEntityModel()->get('END_TIME');
				if (!empty($userTime) && !CCrmDateTimeHelper::IsMaxDatabaseDate($userTime))
				{
					$this->getModel()->setDate(DateTime::createFromUserTime($userTime));
				}
			}

			$scheduledCode = $this->isPlanned()
				? 'CRM_TIMELINE_TITLE_CALL_INCOMING_PLAN'
				: 'CRM_TIMELINE_TITLE_CALL_INCOMING';

			return Loc::getMessage($this->isScheduled() ? $scheduledCode : 'CRM_TIMELINE_TITLE_CALL_INCOMING_DONE');
		case CCrmActivityDirection::Outgoing:
			return Loc::getMessage(
				$this->isPlanned()
					? 'CRM_TIMELINE_TITLE_CALL_OUTGOING_PLAN'
					: 'CRM_TIMELINE_TITLE_CALL_OUTGOING'
			);
	}

	return Loc::getMessage('CRM_TIMELINE_CALL_TITLE_DEFAULT');
}