public function getFile(FileEvent $e)
    {
        $lastFileName = $e->getLastFileName();
        if (is_string($lastFileName)) {
            $repository = $this->serviceManager->get('repositories')->get('Applications/Attachment');
            $file       = $repository->find($lastFileName);
            if (isset($file)) {
                $e->setFileObject($lastFileName, $file);
                $e->stopPropagation();
                return $file;
            }
            return null;
        }
        // if it is not a string i do presume it is already a file-Object
        return $lastFileName;
    }
public function getFile(FileEvent $e)
    {
        $lastFileName = $e->getLastFileName();
        if (is_string($lastFileName)) {
            $repository = $this->serviceManager->get('repositories')->get('Applications/Attachment');
            $file       = $repository->find($lastFileName);
            if (isset($file)) {
                $e->setFileObject($lastFileName, $file);
                $e->stopPropagation();
                return $file;
            }
            return null;
        }
        // if it is not a string i do presume it is already a file-Object
        return $lastFileName;
    }
public function getFile ( FileEvent $ e ) { $ lastFileName = $ e -> getLastFileName ( ) ; if ( is_string ( $ lastFileName ) ) { $ repository = $ this -> serviceManager -> get ( 'repositories' ) -> get ( 'Applications/Attachment' ) ; $ file = $ repository -> find ( $ lastFileName ) ; if ( isset ( $ file ) ) { $ e -> setFileObject ( $ lastFileName , $ file ) ; $ e -> stopPropagation ( ) ; return $ file ; } return null ; } // if it is not a string i do presume it is already a file-Object return $ lastFileName ; }
proxy, in case that you just got a name and have to find the associated file-entity
maybe this is redundant and can be deprecated

@param \Core\View\Helper\InsertFile\FileEvent $e
@return null
proxy in case that you just got a name and have to find the associated file - entity maybe this is redundant and can be deprecated