summaryrefslogtreecommitdiff
path: root/platform/www/lib/plugins/config/core/Setting/SettingDisableactions.php
blob: 2553175bdd786ca36b8fa5189f93d9b42f6b2993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace dokuwiki\plugin\config\core\Setting;

/**
 * Class setting_disableactions
 */
class SettingDisableactions extends SettingMulticheckbox {

    /** @inheritdoc */
    public function html(\admin_plugin_config $plugin, $echo = false) {
        global $lang;

        // make some language adjustments (there must be a better way)
        // transfer some DokuWiki language strings to the plugin
        $plugin->addLang($this->key . '_revisions', $lang['btn_revs']);
        foreach($this->choices as $choice) {
            if(isset($lang['btn_' . $choice])) $plugin->addLang($this->key . '_' . $choice, $lang['btn_' . $choice]);
        }

        return parent::html($plugin, $echo);
    }
}