1<?php 2/** 3 * DokuWiki Plugin cookiebanner (Action Component) 4 * 5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 6 * @author Andreas Gohr <andi@splitbrain.org> 7 */ 8 9class action_plugin_cookiebanner extends DokuWiki_Action_Plugin 10{ 11 12 /** @inheritDoc */ 13 public function register(Doku_Event_Handler $controller) 14 { 15 $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'handleStart'); 16 17 } 18 19 /** 20 * Handle the start event and fill in some config to JSINFO 21 */ 22 public function handleStart(Doku_Event $event, $param) 23 { 24 global $JSINFO; 25 $JSINFO['plugins']['cookiebanner']['script'] = $this->getConf('script'); 26 $JSINFO['plugins']['cookiebanner']['text'] = $this->locale_xhtml('intro'); 27 } 28 29} 30 31