• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/controller/fieldtype.php
  • Класс: Bitrix\Bizproc\Controller\FieldType
  • Вызов: FieldType::normalizeProperty
private function normalizeProperty(array $property): array
{
	if (
		isset($property['OptionsSort']) && is_array($property['OptionsSort'])
		&& isset($property['Options'])
		&& is_array($property['Options'])
		&& count($property['OptionsSort']) === count($property['Options'])
	)
	{
		$sortedOptions = [];
		$sortSuccess = true;
		foreach ($property['OptionsSort'] as $optionKey)
		{
			if (!isset($property['Options'][$optionKey]))
			{
				$sortSuccess = false;
				break;
			}
			$sortedOptions[$optionKey] = $property['Options'][$optionKey];
		}
		if ($sortSuccess)
		{
			$property['Options'] = $sortedOptions;
		}
	}

	return $property;
}