Livefeed::getRenderUrl

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Livefeed
  4. getRenderUrl
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/livefeed.php
  • Класс: Bitrix\Crm\Activity\Provider\Livefeed
  • Вызов: Livefeed::getRenderUrl
static function getRenderUrl(array $activity)
{
	$result = '';

	if (intval($activity["ASSOCIATED_ENTITY_ID"]) > 0)
	{
		if ($activity["PROVIDER_TYPE_ID"] == self::PROVIDER_TYPE_ID_ENTRY)
		{
			$result = '/crm/stream/?log_id='.$activity["ASSOCIATED_ENTITY_ID"];
		}
		elseif ($activity["PROVIDER_TYPE_ID"] == self::PROVIDER_TYPE_ID_COMMENT)
		{
			$res = \CSocNetLogComments::getList(
				array(),
				array(
					"ID" => $activity["ASSOCIATED_ENTITY_ID"]
				),
				false,
				false,
				array("ID", "LOG_ID")
			);
			if (
				($comment = $res->fetch())
				&& (intval($comment["LOG_ID"]) > 0)
			)
			{
				$result = '/crm/stream/?log_id='.$comment["LOG_ID"].'?commentId='.$activity["ASSOCIATED_ENTITY_ID"].'#com'.$activity["ASSOCIATED_ENTITY_ID"];
			}
		}
	}

	return $result;
}

Добавить комментарий