• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/internals/input.php
  • Класс: BitrixSaleInternalsInputFile
  • Вызов: File::getPostWithFiles
static function getPostWithFiles(array $post, array $files)
{
	foreach ($files as $key => $file)
	{
		if (!isset($post[$key]) || !is_array($post[$key]))
		{
			$post[$key] = [];
		}

		foreach ($file as $property => $value)
		{
			if (is_array($value))
			{
				self::getPostWithFilesRecursive($post[$key], $value, $property);
			}
			else
			{
				$post[$key][$property] = $value;
			}
		}
	}

	return $post;
}