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

Presenter: added onRender event #219

Merged
merged 1 commit into from Jul 8, 2019

Conversation

@bckp
Copy link
Contributor

commented May 15, 2019

Added new onRender event, right after beforeRender and before actual render happends (as put it before beforeRender and called it onRender is confusing)

  • Type: new feature
  • BC break: noe
  • doc PR: none

If we want to use traits in project, and mainly in extensios, there should be easy way, how to push somethink into template, but only if template is used. We have onStartup and onShutdown methods, but they are not ideal for this, as onStartup is called even if no reder is performed, so if i add somethink to template there, it will cost me time of template creation, that will never use if redirect is called.

We have beforeRender and afterRender, but that is only methods, so we can modify them with trait.

I suggest new onRender method, that is called right after beforeRender, before render happends (if we called it onBeforeRender, we can put it before beforeRender method, but for i belive onRender is self describe so everybody will understand that.

Presenter: added onRender event
Added new onRender event, right after beforeRender and before actual render happends (as put it before beforeRender and called it onRender is confusing)

@bckp bckp force-pushed the bckp:patch-1 branch from 00a43ea to e731cc6 Jun 6, 2019

@bckp

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

Removed IResponse from onRender (no reason why it should be there) and fixed CS

@dg

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

Thanks

@dg dg merged commit d811678 into nette:master Jul 8, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 78.524%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.