Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[View] Integration Zend\View into PPI #94

Open
dragoonis opened this issue Jun 21, 2013 · 2 comments
Open

[View] Integration Zend\View into PPI #94

dragoonis opened this issue Jun 21, 2013 · 2 comments
Assignees
Milestone

Comments

@dragoonis
Copy link
Member

We need users to be able to render simple templates using Zend\View component.

The implementation should return a string from the controller action which will be executed as the HTTP body.

Bonus points: You return an instance of Zend\View\ModelInterface from the controller action and then tell it to render.

@GeeH
Copy link

GeeH commented Aug 5, 2014

You can't render from a ViewModel, a ViewModel is just the container for the variables that are passed to the view. You'll need to render from a View Renderer, probably the PhpRenderer. I'm thinking we just need to add a working key in the service manager to return a valid php renderer, create a new view model to pass to it (not sure where at the moment) and then call the addTemplate method to add the templates (phtml files) that need to be rendered. It should then just be a case of calling the render method.

@GeeH
Copy link

GeeH commented Aug 5, 2014

Maybe use the renderToPlaceholder method actually. I can look into this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants