user2810648
user2810648

Reputation: 41

Zend Framework: Get View as Return value

I habe a controller and an action to print a website. Now I want to use this output to create a pdf. I dont want to do the same work again in an other action. How can I get the output from the view to use in like: $output = ... hier my controller/action/ and parameters

Thanks a lot!

Upvotes: 0

Views: 77

Answers (1)

homelessDevOps
homelessDevOps

Reputation: 20726

Easy job.

In your ControllerAction use:

// change PHTML FIle for your Action
$output = $this->view->render('controller/youraction.phtml');

Upvotes: 2

Related Questions