CCrmProductPropertyRestProxy::getTypesInfo

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmProductPropertyRestProxy
  4. getTypesInfo
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmProductPropertyRestProxy
  • Вызов: CCrmProductPropertyRestProxy::getTypesInfo
protected function getTypesInfo()
{
	$typesInfo = array();

	if(!$this->TYPES_INFO)
	{
		if(!CModule::IncludeModule('iblock'))
		{
			throw new RestException('Could not load iblock module.');
		}

		$descriptions = CCrmProductPropsHelper::GetPropsTypesDescriptions();
		$typesInfo = array(
			array('PROPERTY_TYPE' => 'S', 'USER_TYPE' => '', 'DESCRIPTION' => $descriptions['S']),
			array('PROPERTY_TYPE' => 'N', 'USER_TYPE' => '', 'DESCRIPTION' => $descriptions['N']),
			array('PROPERTY_TYPE' => 'L', 'USER_TYPE' => '', 'DESCRIPTION' => $descriptions['L']),
			array('PROPERTY_TYPE' => 'F', 'USER_TYPE' => '', 'DESCRIPTION' => $descriptions['F']),
			/*array('PROPERTY_TYPE' => 'G', 'USER_TYPE' => '', 'DESCRIPTION' => $descriptions['G']),*/
			array('PROPERTY_TYPE' => 'E', 'USER_TYPE' => '', 'DESCRIPTION' => $descriptions['E'])
		);
		$userTypes = CCrmProductPropsHelper::GetPropsTypesByOperations(false, 'rest');
		if (is_array($userTypes))
		{
			foreach ($userTypes as $propertyInfo)
			{
				$typesInfo[] = array(
					'PROPERTY_TYPE' => $propertyInfo['PROPERTY_TYPE'],
					'USER_TYPE' => $propertyInfo['USER_TYPE'],
					'DESCRIPTION' => $propertyInfo['DESCRIPTION']
				);
			}
		}

		$this->TYPES_INFO = $typesInfo;
	}

	return $this->TYPES_INFO;
}

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