public function markEntityToUpload($entity, $fileInfo)
    {
        if (is_object($fileInfo) && $fileInfo instanceof UploadedFile) {
            $fileInfoClass = $this->fileInfoClass;

            $fileInfo = new $fileInfoClass($fileInfo);
        }

        $this->listener->addEntityFileInfo($entity, $fileInfo);
    }
public function markEntityToUpload($entity, $fileInfo)
    {
        if (is_object($fileInfo) && $fileInfo instanceof UploadedFile) {
            $fileInfoClass = $this->fileInfoClass;

            $fileInfo = new $fileInfoClass($fileInfo);
        }

        $this->listener->addEntityFileInfo($entity, $fileInfo);
    }
public function markEntityToUpload ( $ entity , $ fileInfo ) { if ( is_object ( $ fileInfo ) && $ fileInfo instanceof UploadedFile ) { $ fileInfoClass = $ this -> fileInfoClass ; $ fileInfo = new $ fileInfoClass ( $ fileInfo ) ; } $ this -> listener -> addEntityFileInfo ( $ entity , $ fileInfo ) ; }
This method marks an entity to be uploaded as soon as the "flush" method of your object manager is called.
After calling this method, the file info you passed is set for this entity in the listener. This is all it takes
to upload a file for an entity in the Uploadable extension.

@param object $entity   - The entity you are marking to "Upload" as soon as you call "flush".
@param mixed  $fileInfo - The file info object or array. In Symfony, this will be typically an UploadedFile instance.
This method marks an entity to be uploaded as soon as the flush method of your object manager is called . After calling this method the file info you passed is set for this entity in the listener . This is all it takes to upload a file for an entity in the Uploadable extension .