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