CCrmOwnerType::GetDetailsUrl

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmOwnerType
  4. GetDetailsUrl
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_owner_type.php
  • Класс: \CCrmOwnerType
  • Вызов: CCrmOwnerType::GetDetailsUrl
static function GetDetailsUrl($typeID, $ID, $bCheckPermissions = false, $options = null)
{
	if(!is_array($options))
	{
		$options = [];
	}

	$typeID = (int)$typeID;
	$ID = (int)$ID;

	if (!static::IsSliderEnabled($typeID))
	{
		return '';
	}

	if ($bCheckPermissions && !static::checkReadPermission($typeID, $ID))
	{
		return '';
	}

	$url = Container::getInstance()->getRouter()->getItemDetailUrl($typeID, $ID);

	if (is_null($url))
	{
		return '';
	}

	if($ID > 0 && !empty($options['INIT_MODE']))
	{
		$url->addParams(['init_mode' => mb_strtolower($options['INIT_MODE'])]);
	}

	if(isset($options['ENABLE_SLIDER']) && $options['ENABLE_SLIDER'] === true)
	{
		$url->addParams(['IFRAME' => 'Y', 'IFRAME_TYPE' => 'SIDE_SLIDER']);
	}

	return $url->getUri();
}

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