本文整理汇总了PHP中Doku_Event_Handler类的典型用法代码示例。如果您正苦于以下问题:PHP Doku_Event_Handler类的具体用法?PHP Doku_Event_Handler怎么用?PHP Doku_Event_Handler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Doku_Event_Handler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register
/**
* Registers a callback function for a given event
*
* @param Doku_Event_Handler $controller DokuWiki's event controller object
* @return void
*/
public function register(Doku_Event_Handler $controller)
{
// ensure a page revision is created when struct data changes:
$controller->register_hook('COMMON_WIKIPAGE_SAVE', 'BEFORE', $this, 'handle_pagesave_before');
// save struct data after page has been saved:
$controller->register_hook('COMMON_WIKIPAGE_SAVE', 'AFTER', $this, 'handle_pagesave_after');
}
示例2: register
/**
* Registers a callback function for a given event
*
* @param Doku_Event_Handler $controller
*/
function register(Doku_Event_Handler $controller)
{
$controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'check', array());
$controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'handle_act_render', array());
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_metaheader_output', array());
$controller->register_hook('ACTION_HEADERS_SEND', 'BEFORE', $this, 'handle_headers_send', array());
}
示例3: register
/**
* Registers a callback function for a given event
*
* @param Doku_Event_Handler $controller the DokuWiki event controller object
* @return void
*/
public function register(Doku_Event_Handler $controller)
{
$controller->register_hook('TPL_ACT_RENDER', 'AFTER', $this, 'load_pagetools_script');
$controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', $this, 'add_button');
Door43_Ajax_Helper::register_handler($controller, 'get_obs_doc_export_dlg', array($this, 'get_obs_doc_export_dlg'));
Door43_Ajax_Helper::register_handler($controller, 'download_obs_template_docx', array($this, 'download_obs_template_docx'));
}
示例4: register
function register(Doku_Event_Handler $controller)
{
global $conf;
if ($conf['allowdebug']) {
$controller->register_hook('TPL_ACT_RENDER', 'AFTER', $this, 'debug', array());
}
}
示例5: register
/**
* Registers a callback function for a given event
*
* @param Doku_Event_Handler $controller
*/
function register(Doku_Event_Handler $controller)
{
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_handle_tpl_act', array());
$controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'bookbar', array());
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, '_extendJSINFO');
$controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', $this, 'addbutton');
}
示例6: register
function register(Doku_Event_Handler $controller)
{
// Support given via AJAX
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'toolbar_add_button', array());
$controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'metaheader_add_images', array());
$controller->register_hook('POPUPVIEWER_DOKUWIKI_STARTED', 'BEFORE', $this, 'popupviewer_metaheader_add_images', array());
}
示例7: register
/**
* Register the events
*/
function register(Doku_Event_Handler $controller)
{
$scriptName = basename($_SERVER['PHP_SELF']);
// should the lang be applied to UI?
if ($this->getConf('translateui')) {
switch ($scriptName) {
case 'js.php':
$controller->register_hook('INIT_LANG_LOAD', 'BEFORE', $this, 'translation_js');
$controller->register_hook('JS_CACHE_USE', 'BEFORE', $this, 'translation_jscache');
break;
case 'ajax.php':
$controller->register_hook('INIT_LANG_LOAD', 'BEFORE', $this, 'translate_media_manager');
break;
case 'mediamanager.php':
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'setJsCacheKey');
break;
default:
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'setJsCacheKey');
}
}
if ($scriptName !== 'js.php' && $scriptName !== 'ajax.php') {
$controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'translation_hook');
$controller->register_hook('MEDIAMANAGER_STARTED', 'BEFORE', $this, 'translation_hook');
}
$controller->register_hook('SEARCH_QUERY_PAGELOOKUP', 'AFTER', $this, 'translation_search');
$controller->register_hook('COMMON_PAGETPL_LOAD', 'AFTER', $this, 'page_template_replacement');
}
示例8: register
public function register(Doku_Event_Handler &$controller)
{
$controller->register_hook('IO_WIKIPAGE_WRITE', 'AFTER', $this, 'handle_io_wikipage_write');
$controller->register_hook('MEDIA_UPLOAD_FINISH', 'AFTER', $this, 'handle_media_upload');
$controller->register_hook('MEDIA_DELETE_FILE', 'AFTER', $this, 'handle_media_deletion');
$controller->register_hook('DOKUWIKI_DONE', 'AFTER', $this, 'handle_periodic_pull');
}
示例9: register
/**
* register the eventhandlers
*/
function register(Doku_Event_Handler $controller)
{
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_before', array());
// allow other plugins to emit logging events
$controller->register_hook('PLUGIN_LOGLOG_LOG', 'BEFORE', $this, 'handle_custom', array());
// autologout plugin
$controller->register_hook('ACTION_AUTH_AUTOLOGOUT', 'BEFORE', $this, 'handle_autologout', array());
}
示例10: register
public function register(Doku_Event_Handler $controller)
{
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'RenderMeta');
$controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'tplMetaDataForm');
//$controller->register_hook('TPL_ACT_RENDER','BEFORE',$this,'tplMetaDataButton');
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'ActPreprocessMeta');
$controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', $this, 'tplMetaDataMenuButton');
}
示例11: register
public function register(Doku_Event_Handler $controller)
{
//add to right menu
$controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', null, function (Doku_Event $event) {
$event->data['items'][] = self::my_current_link_tpl(['do' => 'delete'], 'yk-delete', 'delete [D]', 'd', 'delete');
});
// ajax request
$controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'onAjaxCallUnknown', 'delete');
}
示例12: register
public function register(Doku_Event_Handler &$controller)
{
if ($this->getConf(self::CONF_LOGIN_DS) === true) {
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, '_hookcss');
} else {
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'redirectToLoginHandler');
}
$controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handleLoginForm');
}
示例13: register
/**
* Register its handlers with the DokuWiki's event controller
*/
function register(Doku_Event_Handler $controller)
{
// register custom edit buttons
$controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'secedit_button');
// register our editor
$controller->register_hook('HTML_EDIT_FORMSELECTION', 'BEFORE', $this, 'editform');
// register preprocessing for accepting editor data
// $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_table_post');
$controller->register_hook('PLUGIN_EDITTABLE_PREPROCESS_EDITOR', 'BEFORE', $this, 'handle_table_post');
}
示例14: register
/**
* Register the events
*
* @param Doku_Event_Handler $controller
*/
public function register(Doku_Event_Handler $controller)
{
/**
* Submission button in top user menu bar
*/
$controller->register_hook('TEMPLATE_USERTOOLS_DISPLAY', 'BEFORE', $this, 'addButton');
/**
* Submissions page content
*/
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'submissionsPageAction');
$controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'submissionsPageContent');
/**
* Remove page cache after login
*/
$controller->register_hook('AUTH_LOGIN_CHECK', 'AFTER', $this, 'removePageCache');
/**
* export to csv icon in submissions page
*/
$controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', $this, 'addCsvButton', array());
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'exportToCSV');
/**
* Ajax calls
*/
$controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'ajaxHandler');
}
示例15: register
/**
* Register callback functions
*
* @param {Doku_Event_Handler} $controller DokuWiki's event controller object
*/
public function register(Doku_Event_Handler $controller)
{
$controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'handle_start');
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'override_loadskin');
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action_before');
$controller->register_hook('ACTION_ACT_PREPROCESS', 'AFTER', $this, 'handle_action');
$controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'pre_render');
$controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'unknown_action');
$controller->register_hook('ACTION_SHOW_REDIRECT', 'BEFORE', $this, 'handle_redirect');
$controller->register_hook('ACTION_HEADERS_SEND', 'BEFORE', $this, 'block_headers');
}