summaryrefslogtreecommitdiff
path: root/lib/plugins/admin.php
blob: 9a1fb9fdc351f3ccbcf958c122d2a6789a25a3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
 * Admin Plugin Prototype
 *
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @author     Christopher Smith <chris@jalakai.co.uk>
 */
// must be run within Dokuwiki
if(!defined('DOKU_INC')) die();

/**
 * All DokuWiki plugins to extend the admin function
 * need to inherit from this class
 */
class DokuWiki_Admin_Plugin extends DokuWiki_Plugin {

    function getMenuText($language) {
        $menutext = $this->getLang('menu');
        if (!$menutext) {
            $info = $this->getInfo();
            $menutext = $info['name'].' ...';
        }
        return $menutext;
    }

    function getMenuSort() {
        return 1000;
    }

    function handle() {
        trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING);
    }

    function html() {
        trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING);
    }

    function forAdminOnly() {
        return true;
    }

    function getTOC(){
        return array();
    }
}
//Setup VIM: ex: et ts=4 :