public function getElement($file_id)
    {
        $ret = ['success' => false, 'message' => '', 'result'  => []];
        
        /* @var LazaretFile $lazaretFile */
        $lazaretFile = $this->getLazaretFileRepository()->find($file_id);

        if (null === $lazaretFile) {
            $ret['message'] = $this->app->trans('File is not present in quarantine anymore, please refresh');

            return $this->app->json($ret);
        }

        $ret['result'] = [
            'filename' => $lazaretFile->getOriginalName(),
            'base_id'  => $lazaretFile->getBaseId(),
            'created'  => $lazaretFile->getCreated()->format(\DateTime::ATOM),
            'updated'  => $lazaretFile->getUpdated()->format(\DateTime::ATOM),
            'pathname' => $this->app['tmp.lazaret.path'].'/'.$lazaretFile->getFilename(),
            'sha256'   => $lazaretFile->getSha256(),
            'uuid'     => $lazaretFile->getUuid(),
        ];
        $ret['success'] = true;

        return $this->app->json($ret);
    }
public function getElement($file_id)
    {
        $ret = ['success' => false, 'message' => '', 'result'  => []];
        
        /* @var LazaretFile $lazaretFile */
        $lazaretFile = $this->getLazaretFileRepository()->find($file_id);

        if (null === $lazaretFile) {
            $ret['message'] = $this->app->trans('File is not present in quarantine anymore, please refresh');

            return $this->app->json($ret);
        }

        $ret['result'] = [
            'filename' => $lazaretFile->getOriginalName(),
            'base_id'  => $lazaretFile->getBaseId(),
            'created'  => $lazaretFile->getCreated()->format(\DateTime::ATOM),
            'updated'  => $lazaretFile->getUpdated()->format(\DateTime::ATOM),
            'pathname' => $this->app['tmp.lazaret.path'].'/'.$lazaretFile->getFilename(),
            'sha256'   => $lazaretFile->getSha256(),
            'uuid'     => $lazaretFile->getUuid(),
        ];
        $ret['success'] = true;

        return $this->app->json($ret);
    }
public function getElement ( $ file_id ) { $ ret = [ 'success' => false , 'message' => '' , 'result' => [ ] ] ; /* @var LazaretFile $lazaretFile */ $ lazaretFile = $ this -> getLazaretFileRepository ( ) -> find ( $ file_id ) ; if ( null === $ lazaretFile ) { $ ret [ 'message' ] = $ this -> app -> trans ( 'File is not present in quarantine anymore, please refresh' ) ; return $ this -> app -> json ( $ ret ) ; } $ ret [ 'result' ] = [ 'filename' => $ lazaretFile -> getOriginalName ( ) , 'base_id' => $ lazaretFile -> getBaseId ( ) , 'created' => $ lazaretFile -> getCreated ( ) -> format ( \ DateTime :: ATOM ) , 'updated' => $ lazaretFile -> getUpdated ( ) -> format ( \ DateTime :: ATOM ) , 'pathname' => $ this -> app [ 'tmp.lazaret.path' ] . '/' . $ lazaretFile -> getFilename ( ) , 'sha256' => $ lazaretFile -> getSha256 ( ) , 'uuid' => $ lazaretFile -> getUuid ( ) , ] ; $ ret [ 'success' ] = true ; return $ this -> app -> json ( $ ret ) ; }
Get one lazaret Element

@param int $file_id A lazaret element id

@return Response
Get one lazaret Element