• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/controller/property.php
  • Класс: BitrixSaleControllerProperty
  • Вызов: Property::getTypes
public function getTypes()
{
	$r =[];
	foreach(array_keys(Manager::getTypes()) as $type)
	{
		$fields = self::getCommonFields();

		$fields += Manager::getCommonSettings(['TYPE'=>$type], null );

		$fields['MULTIPLE']['DESCRIPTION'] = Loc::getMessage('MULTIPLE_DESCRIPTION');

		$fields['DEFAULT_VALUE']=[
			'REQUIRED'=>'N',
			'DESCRIPTION'=>null,
			'LABEL'=>Loc::getMessage('F_DEFAULT_VALUE')
		];

		$fields += $this->getInputSettings(['TYPE'=>$type]);

		if ($type === 'STRING')
		{
			$fields += $this->getStringSettings();
		}
		elseif ($type === 'LOCATION')
		{
			$fields += $this->getLocationSettings();
		}
		elseif ($type === 'ADDRESS')
		{
			$fields += $this->getAddressSettings();
		}

		foreach ($fields as $code=>&$v)
		{
			foreach ($v as $name=>$value)
			{
				if(in_array($name, ['ONCHANGE','ONCLICK', 'OPTIONS']))
				{
					unset($v[$name]);
				}
			}
		}

		$r[$type] = $fields;
	}

	return ['ENUM'=>$r];
}