action.php
author Andreas Boehler <andreas@aboehler.at>
Fri, 12 Sep 2014 07:01:55 +0200
changeset 0 11a7dcc4af7a
child 1 347546fd9315
permissions -rw-r--r--
Initial import of datapopup
0
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     1
<?php
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     2
/**
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     3
 * DokuWiki Plugin datapopup (Action Component)
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     4
 *
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     5
 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     6
 * @author  Andreas Boehler <dev@aboehler.at>
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     7
 */
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     8
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     9
// must be run within Dokuwiki
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    10
if (!defined('DOKU_INC')) die();
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    11
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    12
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    13
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    14
require_once(DOKU_PLUGIN.'action.php');
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    15
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    16
class action_plugin_datapopup extends DokuWiki_Action_Plugin {
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    17
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    18
    var $dthlp = null;
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    19
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    20
    function action_plugin_datapopup() {
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    21
        $this->dthlp =& plugin_load('helper', 'data');
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    22
    }
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    23
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    24
    function register(&$controller) {
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    25
        global $JSINFO;
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    26
        $JSINFO['plugin']['datapopup']['registered_types'] = $this->getConf('registered_types');
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    27
    }
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    28
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    29
    function getFields($link, $name) {
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    30
        return $this->dthlp->_resolveSummary($link, $name);
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    31
    }
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    32
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    33
}
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    34
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    35
// vim:ts=4:sw=4:et:enc=utf-8: