• Модуль: highloadblock
  • Путь к файлу: ~/bitrix/modules/highloadblock/classes/general/prop_directory.php
  • Класс: CIBlockPropertyDirectory
  • Вызов: CIBlockPropertyDirectory::AddFilterFields
static function AddFilterFields($arProperty, $strHTMLControlName, &$arFilter, &$filtered): void
{
	$filtered = false;
	$values = array();

	if (isset($_REQUEST[$strHTMLControlName["VALUE"]]))
		$values = (is_array($_REQUEST[$strHTMLControlName["VALUE"]]) ? $_REQUEST[$strHTMLControlName["VALUE"]] : array($_REQUEST[$strHTMLControlName["VALUE"]]));
	elseif (isset($GLOBALS[$strHTMLControlName["VALUE"]]))
		$values = (is_array($GLOBALS[$strHTMLControlName["VALUE"]]) ? $GLOBALS[$strHTMLControlName["VALUE"]] : array($GLOBALS[$strHTMLControlName["VALUE"]]));

	if (!empty($values))
	{
		$clearValues = array();
		foreach ($values as $oneValue)
		{
			$oneValue = (string)$oneValue;
			if ($oneValue != '')
				$clearValues[] = $oneValue;
		}
		$values = $clearValues;
		unset($oneValue, $clearValues);
	}
	if (!empty($values))
	{
		$filtered = true;
		$arFilter['=PROPERTY_'.$arProperty['ID']] = $values;
	}
}