return [ FormEvents::SUBMIT => 'onSubmit',
];
} /**
* @return void
*/
public function onSubmit(FormEvent
$event) { $dataToMergeInto =
$event->
getForm()->
getNormData();
$data =
$event->
getData() ??
[];
if (!\
is_array($data) && !
($data instanceof \Traversable &&
$data instanceof \ArrayAccess
)) { throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'
);
} if (null !==
$dataToMergeInto && !\
is_array($dataToMergeInto) && !
($dataToMergeInto instanceof \Traversable &&
$dataToMergeInto instanceof \ArrayAccess
)) { throw new UnexpectedTypeException($dataToMergeInto, 'array or (\Traversable and \ArrayAccess)'
);
} // If we are not allowed to change anything, return immediately