Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Remove ViewTemplate auto_fetch config option #99

Closed
johanjanssens opened this issue May 26, 2016 · 0 comments · Fixed by #100
Closed

Remove ViewTemplate auto_fetch config option #99

johanjanssens opened this issue May 26, 2016 · 0 comments · Fixed by #100
Labels

Comments

@johanjanssens
Copy link
Member

johanjanssens commented May 26, 2016

Always let the view fetch the model data. In case this is not required an extending view can override the _fetchData() method to provide it's own implementation.

Breaking changes:

  • If you do not want a view to auto-matically fetch data from the model you need to override the _fetchData() method.
johanjanssens added a commit that referenced this issue May 27, 2016
- Add ViewContentInterface::getEntity() and implement getEntity/setEntity in ViewContext
- Remove ViewContextInterface::getContent()
- Remove ViewContext::setContent()
johanjanssens added a commit that referenced this issue May 27, 2016
-Inject the model entity into the context
- Move the _fetchData() action callback to ViewTemplate
- Remove ViewContent::getContent() use $context->result to return the result of the rendered view
johanjanssens added a commit that referenced this issue May 27, 2016




- Remove the auto_fetch config option in ViewTemplate


- Move the _fetchData() callback handler from ViewAbstract to ViewTemplate

BREAKING! If you do not want a view to auto-matically fetch data from the model you need to override the _fetchData() method
johanjanssens added a commit that referenced this issue May 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant