當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Doku_Event_Handler類代碼示例

本文整理匯總了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');
 }
開發者ID:cosmocode,項目名稱:dokuwiki-plugin-struct,代碼行數:13,代碼來源:revert.php

示例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());
 }
開發者ID:stupid-beard,項目名稱:plugin-blogtng,代碼行數:12,代碼來源:linkback.php

示例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'));
 }
開發者ID:richmahn,項目名稱:Door43,代碼行數:13,代碼來源:ExportButtons.php

示例4: register

 function register(Doku_Event_Handler $controller)
 {
     global $conf;
     if ($conf['allowdebug']) {
         $controller->register_hook('TPL_ACT_RENDER', 'AFTER', $this, 'debug', array());
     }
 }
開發者ID:hefanbo,項目名稱:dokuwiki-plugin-publish,代碼行數:7,代碼來源:debug.php

示例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');
 }
開發者ID:a-gundy,項目名稱:dokuwiki-plugin-bookcreator,代碼行數:12,代碼來源:action.php

示例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());
 }
開發者ID:godhelpjun,項目名稱:dokuwiki-plugin-imageflow,代碼行數:7,代碼來源:action.php

示例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');
 }
開發者ID:splitbrain,項目名稱:dokuwiki-plugin-translation,代碼行數:30,代碼來源:action.php

示例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');
 }
開發者ID:daimrod,項目名稱:dokuwiki-plugin-gitbacked,代碼行數:7,代碼來源:editcommit.php

示例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());
 }
開發者ID:splitbrain,項目名稱:dokuwiki-plugin-loglog,代碼行數:11,代碼來源:action.php

示例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');
 }
開發者ID:cevro,項目名稱:dokuwiki-plugin-social,代碼行數:8,代碼來源:action.php

示例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');
 }
開發者ID:yurii-github,項目名稱:dokuwiki-plugin-yktools,代碼行數:9,代碼來源:activity.php

示例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');
 }
開發者ID:MI-OSiRIS,項目名稱:dokuwiki-shibboleth-auth,代碼行數:9,代碼來源:action.php

示例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');
 }
開發者ID:hefanbo,項目名稱:edittable,代碼行數:13,代碼來源:editor.php

示例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');
 }
開發者ID:smmsadrnezh,項目名稱:dokuwiki-plugin-judge,代碼行數:30,代碼來源:action.php

示例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');
 }
開發者ID:sawachan,項目名稱:dokuwiki_fastwiki,代碼行數:16,代碼來源:action.php


注:本文中的Doku_Event_Handler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。