DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:action_router

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Both sides next revision
devel:action_router [2018-03-29 12:41]
andi created
devel:action_router [2021-01-23 17:57]
Klap-in [Action Plugins]
Line 11: Line 11:
   - check if the action is disabled through [[config:disableactions]] or by the auth backend   - check if the action is disabled through [[config:disableactions]] or by the auth backend
     * if yes, shows a message and switches to ''show'' or ''redirect'' actions for GET and POST request respectively     * if yes, shows a message and switches to ''show'' or ''redirect'' actions for GET and POST request respectively
-  - ''Action::checkPermissions''+  - ''Action::checkPreconditions''
     * The action itself can do custom checks that are required to use this action. An [[xref>ActionException]] is to be thrown if permissions aren't met     * The action itself can do custom checks that are required to use this action. An [[xref>ActionException]] is to be thrown if permissions aren't met
   - ''Action::minimumPermission''   - ''Action::minimumPermission''
Line 32: Line 32:
 The [[devel:event:ACTION_ACT_PREPROCESS]] event basically wraps around all the steps under [[#Action Routing]]. Plugins that prevent the default action in this event's BEFORE phase will then later be handled in the new ''Plugin'' action which has a ''tplContent'' method that triggers [[devel:event:TPL_ACT_UNKNOWN]]. The [[devel:event:ACTION_ACT_PREPROCESS]] event basically wraps around all the steps under [[#Action Routing]]. Plugins that prevent the default action in this event's BEFORE phase will then later be handled in the new ''Plugin'' action which has a ''tplContent'' method that triggers [[devel:event:TPL_ACT_UNKNOWN]].
  
 +
 +==== Change action within a POST request ====
 +If you use the [[devel:event:ACTION_ACT_PREPROCESS]] event, and you have to redirect to the 'show' action, you have to use the 'redirect' action actually. This will reset the parameters as well.
devel/action_router.txt ยท Last modified: 2021-01-23 17:57 by Klap-in