Feature #2853

Routing: @action, @format... should be settable via request arguments

Added by Bastian Waidelich about 11 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
MVC
Start date:
2009-03-16
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

Currently all "@-arguments" (@package, @subpackage, @controller, @action and @format) are checked only for "route match results". You can't set the action via _GET / _POST.
Imagine, you have a form with two submit buttons

<button name="@action1">action 01</button>
<button name="@action2">action 02</button>

IMO that should be possible.
TODOs for this feature:

1. check these arguments in the router:

if ($request->hasArgument('@action')) {
    $request->setControllerActionName($request->getArgument('@action'));
}
...

2. modify URIHelper and make action-argument optional


Related issues

Related to TYPO3.Flow - Task #3368: Move setArgumentsFromRawRequestData() from Router to RequestBuilder Resolved 2009-05-18

Associated revisions

Revision 7030ab49 (diff)
Added by Bastian Waidelich about 11 years ago

FLOW3:
  • Removed FLOW3\Utility\GenericCollection from repository, it's currently not needed. Resolves #3400
  • Moved method setArgumentsFromRawRequestData() from Router to RequestBuilder. Resolves #3368
  • Renamed URIHelper to URIBuilder. Removed Classes HelperInterface, AbstractHelper and InvalidViewHelper Exception. Adapted AbstractView & ViewInterface. Resolves #3303
  • Added section parameter to URIFor() method of the URIBuilder
  • Refactored Base controllers - controllerContext is no instance variable anymore and will be created when passed to view in initializeView(). Resolves #3404
  • ControllerContext is of scope prototype now. Added setter/getter for URIBuilder. Some cosmetic changes.
  • Added getRequestPath() to Request.
  • ControllerKeys (@controller, @action, @package, @subpackage and @format) can now be set by request arguments. Resolves #2853

History

#1 Updated by Bastian Waidelich about 11 years ago

  • Assignee set to Bastian Waidelich

#2 Updated by Bastian Waidelich about 11 years ago

  • Status changed from New to Needs Feedback

maybe @package & @controller should not be settable via GET/POST until the security framework is in action.
Otherwise we couldn't have something like http://flow/help only for DEV context as you could always write http://flow?@package=help

#3 Updated by Robert Lemke about 11 years ago

It makes sense to be able to override the action, probably even controller and package.

Let's assume that the security framework is already there because it will be in 1.0 final.

#4 Updated by Robert Lemke about 11 years ago

  • Target version set to 283

#5 Updated by Bastian Waidelich about 11 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2344.

#6 Updated by Robert Lemke almost 11 years ago

  • Target version changed from 283 to 1.0 alpha 1

Also available in: Atom PDF