DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:tpl_act_unknown

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
devel:event:tpl_act_unknown [2018-12-08 16:11] – doc updated according to issue #2615 torpedodevel:event:tpl_act_unknown [2022-08-31 16:54] (current) – [Note for implementors] Klap-in
Line 28: Line 28:
 <code php> <code php>
   public function register(Doku_Event_Handler $controller) {   public function register(Doku_Event_Handler $controller) {
-      $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE',  $this, 'allow_my_action'); +      $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE',  $this, 'allowMyAction'); 
-      $controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE',  $this, 'my_action');+      $controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE',  $this, 'performMyAction');
   }   }
      
-  public function allow_my_action(Doku_Event $event, $param) {+  public function allowMyAction(Doku_Event $event, $param) {
       if($event->data != 'my_action') return;        if($event->data != 'my_action') return; 
       $event->preventDefault();       $event->preventDefault();
   }   }
      
-  public function my_action(Doku_Event $event, $param) {+  public function performMyAction(Doku_Event $event, $param) {
       if($event->data != 'my_action') return;        if($event->data != 'my_action') return; 
       $event->preventDefault();       $event->preventDefault();
devel/event/tpl_act_unknown.txt · Last modified: 2022-08-31 16:54 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki