Do a redirect in the backend.

i have created a plugin in shopware and wanted  it to create a document then redirect the user to the document for download purposes. i have realised that when i click on the docmunet link in the back end to view it it creates a url like this http://localhost:8000/backend/Order/openPdf?id=mydocharsh  so i wanted to know how i can achive the same thing using the $this->redirect() function. is this possible in the backend because i have used it before in the frontend and it worked well for me.

 

this is the code is have for redirect.  param just has the other half for the link (?id=mydocharsh) . so what could be the issue and what am i doing wrong … any suggestion is welcome.

    public function redirectToPdf($param)
    {
        $this->redirect(
          array(
            'controller' => Order,
            'action' => 'openPdf',
            'id' => $param,
          )
        );
    }