• Модуль: highloadblock
  • Путь к файлу: ~/bitrix/modules/highloadblock/classes/general/prop_directory.php
  • Класс: CIBlockPropertyDirectory
  • Вызов: CIBlockPropertyDirectory::normalizeValue
static function normalizeValue($value): array
{
	$result = [];
	if (!is_array($value))
	{
		$value = (string)$value;
		if ($value !== '')
			$result[] = $value;
	}
	else
	{
		if (!empty($value))
		{
			if (isset($value['VALUE']) && is_array($value['VALUE']))
			{
				$value = $value['VALUE'];
			}
			foreach ($value as $row)
			{
				$oneValue = '';
				if (is_array($row))
				{
					if (isset($row['VALUE']))
						$oneValue = (string)$row['VALUE'];
				}
				else
				{
					$oneValue = (string)$row;
				}
				if ($oneValue !== '')
					$result[] = $oneValue;
			}
			unset($oneValue, $row);
		}
	}
	return $result;
}