• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/helpers/arrays/arrayflatterator.php
  • Класс: BitrixIblockHelpersArraysArrayFlatterator
  • Вызов: ArrayFlatterator::flatten
public function flatten(array $input): array
{
	if (!empty($this->processedKeys))
	{
		return $this->flattenWithCheckKeys($input);
	}

	foreach ($input as $key => $value)
	{
		if (is_array($value))
		{
			$newItems = $this->getFlattenFields($value, $key);
			foreach ($newItems as $newKey => $newValue)
			{
				$input[$newKey] = $newValue;
			}
		}
	}

	return $input;
}