public function showFileAction()
    {
        $id = $this->getRequest()->get($this->admin->getIdParameter());
        $invoice = $this->admin->getObject($id);

        if (!$invoice) {
            throw $this->createNotFoundException(sprintf('Unable to find the invoice with id : %s', $id));
        }

        $this->admin->checkAccess('show', $invoice);

        return new Response(
            $invoice->getFile(),
            200,
            ['Content-Type' => 'application/pdf']
        );
    }
public function showFileAction()
    {
        $id = $this->getRequest()->get($this->admin->getIdParameter());
        $invoice = $this->admin->getObject($id);

        if (!$invoice) {
            throw $this->createNotFoundException(sprintf('Unable to find the invoice with id : %s', $id));
        }

        $this->admin->checkAccess('show', $invoice);

        return new Response(
            $invoice->getFile(),
            200,
            ['Content-Type' => 'application/pdf']
        );
    }
public function showFileAction ( ) { $ id = $ this -> getRequest ( ) -> get ( $ this -> admin -> getIdParameter ( ) ) ; $ invoice = $ this -> admin -> getObject ( $ id ) ; if ( ! $ invoice ) { throw $ this -> createNotFoundException ( sprintf ( 'Unable to find the invoice with id : %s' , $ id ) ) ; } $ this -> admin -> checkAccess ( 'show' , $ invoice ) ; return new Response ( $ invoice -> getFile ( ) , 200 , [ 'Content-Type' => 'application/pdf' ] ) ; }
show file action.

@return Response
show file action .