CCrmOwnerType::GetResponsibleID

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmOwnerType
  4. GetResponsibleID
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_owner_type.php
  • Класс: \CCrmOwnerType
  • Вызов: CCrmOwnerType::GetResponsibleID
static function GetResponsibleID($typeID, $ID, $checkRights = true)
{
	$typeID = intval($typeID);
	$ID = intval($ID);
	$checkRights = $checkRights === true;

	if(!(self::IsDefined($typeID) && $ID > 0))
	{
		return 0;
	}

	$key = "{$typeID}_{$ID}_" . ($checkRights ? 'Y' : 'N');
	if(isset(self::$RESPONSIBLES[$key]))
	{
		return self::$RESPONSIBLES[$key];
	}

	$result = static::loadResponsibleId($typeID, $ID, $checkRights);

	self::$RESPONSIBLES[$key] = $result;
	return $result;
}

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