• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/entity/source/ormconverter.php
  • Класс: BitrixLocationEntitySourceOrmConverter
  • Вызов: OrmConverter::convertArrayToConfigItem
private function convertArrayToConfigItem(array $array)
{
	if (!isset($array['code']))
	{
		throw new RuntimeException('code is not specified');
	}

	$result = new ConfigItem($array['code'], $array['type']);

	if (isset($array['is_visible']))
	{
		$result->setIsVisible($array['is_visible']);
	}
	if (isset($array['sort']))
	{
		$result->setSort((int)$array['sort']);
	}
	if (isset($array['value']))
	{
		$result->setValue(isset($array['value']) ? (string)$array['value'] : null);
	}

	return $result;
}