1<?php
2
3require_once dirname(__FILE__) . '/../lib/action_manager.php';
4
5class action_plugin_components_action extends DokuWiki_Action_Plugin
6{
7    /**
8     * Register its handlers with the DokuWiki's event controller
9     */
10    function register(Doku_Event_Handler $controller) {
11        $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this,
12                                   'act');
13    }
14
15    function act(&$event, $param) {
16        $action_manager = Doku_Action_Manager::manager();
17        if ($action_manager && $action_manager->act($event->data))
18            $event->preventDefault();
19    }
20}
21