[ZF2-224 ZF2-228] Create 404 view model when detecting 404 responses #1042

Merged
merged 1 commit into from May 7, 2012

Projects

None yet

4 participants

Owner
  • Registers Zend\Mvc\View\RouteNotFoundStrategy::prepareNotFoundViewModel
    with Zend\Stdlib\Dispatchable dispatch event to ensure it executes at
    the appropriate time during the request lifecycle.
Contributor
omerida commented Apr 18, 2012

commit works for me, can now do the following in a controller to invoke a 404 page.

return $this->notFoundAction();
Member
akrabat commented Apr 23, 2012

Please update so that it merges cleanly.

@weierophinney weierophinney [ZF2-224 ZF2-228] Create 404 view model when detecting 404 responses
- Registers Zend\Mvc\View\RouteNotFoundStrategy::prepareNotFoundViewModel
  with Zend\Stdlib\Dispatchable dispatch event to ensure it executes at
  the appropriate time during the request lifecycle.
7dc7f8e
Owner

@akrabat I've rebased, and it should be merge-able now.

@akrabat akrabat merged commit 7dc7f8e into zendframework:master May 7, 2012

I'm unsure of why this uses MvcEvent::EVENT_DISPATCH and not MvcEvent::EVENT_DISPATCH_ERROR

Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment