$files =
$event->
getData();
if (!\
is_array($files)) { $files =
[];
} foreach ($files as $file) { if ($requestHandler->
isFileUpload($file)) { $data[] =
$file;
if (method_exists($requestHandler, 'getUploadFileError'
) && null !==
$errorCode =
$requestHandler->
getUploadFileError($file)) { $form->
addError($this->
getFileUploadError($errorCode));
} } } // Since the array is never considered empty in the view data format
// on submission, we need to evaluate the configured empty data here
if ([] ===
$data) { $emptyData =
$form->
getConfig()->
getEmptyData();
$data =
$emptyData instanceof \Closure ?
$emptyData($form,
$data) :
$emptyData;
}