Task #54618

Split up ActionController::errorAction()

Added by Andreas Wolf over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2013-12-28
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:MVC
Target version:-
Sprint: Has patch:No
PHP Version: Complexity:

Description

The method errorAction() in ActionController contains code that does three jobs:

  • adding the error flash messages
  • redirecting back to the original request
  • outputting a flattened validation error messages

As one might wish to override one or more of these aspects, but not c&p the whole code, these concerns should be moved to separate methods that are called from errorAction().


Related issues

duplicated by TYPO3 Flow Base Distribution - Task #55189: Extract forward handling from errorAction Closed 2014-01-20

Associated revisions

Revision 2c5e09a3
Added by Andreas Wolf over 1 year ago

[TASK] Decouple responsibilites in default errorAction()

The default errorAction() implementation in ActionController does quite
a few things, e.g. rendering an error message and forwarding back to the
original request. When implementing an own error action, this might be
unhandy, because the default error message is not so useful, while the
whole request back-forwarding stuff works quite neat. This commit
therefore moves the different parts into their own methods, which are
called by errorAction(). Each of these calls can then be used or
omitted in custom implementations of errorAction().

Change-Id: I290e7679f72fab0426ab82810176fff5558de5f5
Resolves: #54618
Releases: master

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26570

#2 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26570

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26570

#4 Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26570

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26570

#6 Updated by Andreas Wolf over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF