public function emptyData(FormInterface $form)
    {
        $file = $form->get('bengor_file')->getData();
        if (null === $file) {
            return;
        }

        return new UploadFileCommand(
            $file->getClientOriginalName(),
            file_get_contents($file->getPathname()),
            $file->getMimeType()
        );
    }
public function emptyData(FormInterface $form)
    {
        $file = $form->get('bengor_file')->getData();
        if (null === $file) {
            return;
        }

        return new UploadFileCommand(
            $file->getClientOriginalName(),
            file_get_contents($file->getPathname()),
            $file->getMimeType()
        );
    }
public function emptyData ( FormInterface $ form ) { $ file = $ form -> get ( 'bengor_file' ) -> getData ( ) ; if ( null === $ file ) { return ; } return new UploadFileCommand ( $ file -> getClientOriginalName ( ) , file_get_contents ( $ file -> getPathname ( ) ) , $ file -> getMimeType ( ) ) ; }
Method that encapsulates all the logic of build empty data.
It returns an instance of data class object.

@param FormInterface $form The form

@return UploadFileCommand|null
Method that encapsulates all the logic of build empty data . It returns an instance of data class object .