Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Conversation

@weierophinney
Copy link
Member

This pull request better abstracts layout capabilities for the zend-view adapter. It does so by:

  • Allowing passing a layout script name or ViewModel representing the layout as the second argument in the constructor.
  • Allowing passing a "layout" parameter during rendering, which may be a layout script name or a ViewModel representing the layout.

In each case, rendering now munges the provided template and parameters into a view model, injecting it as a child of the layout view model if one is discovered (if a layout script name is passed, a layout view model is created to represent it).

This makes usage look more like the other adapters, and brings its capabilities to the same level of completion.

This patch abstracts layouts by doing the following:

- Allowing passing a layout script name or ViewModel representing the
  layout as the second argument in the constructor.
- Allowing passing a "layout" parameter during rendering, which may be a
  layout script name or a ViewModel representing the layout.

In each case, rendering now munges the provided template and parameters
into a view model, injecting it as a child of the layout view model if
one is discovered (if a layout script name is passed, a layout view
model is created to represent it).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ;

@weierophinney
Copy link
Member Author

@samsonasik Thanks -- fixed locally, and will include those fixes with merge.

@weierophinney weierophinney merged commit e16f233 into zendframework:master Aug 26, 2015
weierophinney added a commit that referenced this pull request Aug 26, 2015
@weierophinney weierophinney deleted the feature/zend-view-layouts branch August 26, 2015 04:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants