[TYPO3-mvc] Howto make a redirect from a php-view?
Sebastian Kurfürst
sebastian at typo3.org
Mon Oct 12 08:44:10 CEST 2009
Hey Joerg,
> I have a "pdfAction" within a controller, which fetches all related data
> and then I "turn over" to a PHP-view, to create the pdf-document with
> the help of "tcpdf". Because PDF is a kinf of output, this have to be in
> the view-part of my extension, I think.
> But how can I afterwards redirect e.g. to the "indexActioN" of a
> specific controller?
I'd let the View not save the PDF, but return it as a byte stream.
Then you could do the following inside your controller:
...
$pdfData = $this->view->render();
file_put_contents(..., $pdfData);
$this->redirect('index');
Greets,
Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list