xref: /plugin/searchindex/admin.php (revision 4773e14500fce3dfff8e66d291ab9dd93ca4eeb4)
1dc6fce52SAndreas Gohr<?php
2dc6fce52SAndreas Gohr
3*4773e145SAndreas Gohruse dokuwiki\Extension\AdminPlugin;
4*4773e145SAndreas Gohr
5dc6fce52SAndreas Gohr/**
6072f05c6SSatoshi Sahara * DokuWiki Searchindex Manager
7072f05c6SSatoshi Sahara *
8072f05c6SSatoshi Sahara * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
9072f05c6SSatoshi Sahara * @author     Andreas Gohr <andi@splitbrain.org>
10dc6fce52SAndreas Gohr */
11*4773e145SAndreas Gohrclass admin_plugin_searchindex extends AdminPlugin
12072f05c6SSatoshi Sahara{
13dc6fce52SAndreas Gohr    /**
14dc6fce52SAndreas Gohr     * return sort order for position in admin menu
15dc6fce52SAndreas Gohr     */
16072f05c6SSatoshi Sahara    public function getMenuSort()
17072f05c6SSatoshi Sahara    {
18dc6fce52SAndreas Gohr        return 40;
19dc6fce52SAndreas Gohr    }
20dc6fce52SAndreas Gohr
21dc6fce52SAndreas Gohr    /**
22dc6fce52SAndreas Gohr     * handle user request
23dc6fce52SAndreas Gohr     */
24072f05c6SSatoshi Sahara    public function handle()
25072f05c6SSatoshi Sahara    {
26dc6fce52SAndreas Gohr    }
27dc6fce52SAndreas Gohr
28dc6fce52SAndreas Gohr    /**
29dc6fce52SAndreas Gohr     * output appropriate html
30dc6fce52SAndreas Gohr     */
31072f05c6SSatoshi Sahara    public function html()
32072f05c6SSatoshi Sahara    {
33*4773e145SAndreas Gohr        $this->setupLocale();
3457c75f9cSAndreas Gohr        echo $this->locale_xhtml('intro');
35*4773e145SAndreas Gohr        echo '<searchindex-manager id="plugin__searchindex"' .
36*4773e145SAndreas Gohr            ' lang="' . htmlspecialchars(json_encode($this->lang)) . '"' .
37*4773e145SAndreas Gohr            ' url="' . DOKU_BASE . 'lib/plugins/searchindex/ajax.php"' .
38*4773e145SAndreas Gohr            '></searchindex-manager>';
39dc6fce52SAndreas Gohr    }
40dc6fce52SAndreas Gohr}
41