try to return SfView::NONE
or disable layout in module/view.yml
greets
Sven
Mark Smith schrieb:
> Hi,
>
> I am trying to add an action that just returns a report as raw CSV
> data.
>
> Is it possible to bypass the template layer and just set my own
> content?
>
> My code looks like this so far:
>
> public function execute($request)
> {
> $response = $this->getResponse();
> $manager=new ReportManager();
> $response->setContent($manager->getReport());
> $response->sendContent();
> }
>
> The CSV data gets written out perfectly, but then so does my layout
> and template.
>
> Is it possible to stop this? And also set the mime type?
>
> Thanks for any help.
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---