Failed Conditions
Pull Request — psr2 (#2382)
by Andreas
08:02 queued 12s
created

SettingDisableactions::html()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 6
nc 3
nop 2
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\plugin\config\core\Setting;
4
5
/**
6
 * Class setting_disableactions
7
 */
8
class SettingDisableactions extends SettingMulticheckbox {
9
10
    /** @inheritdoc */
11
    public function html(\admin_plugin_config $plugin, $echo = false) {
12
        global $lang;
13
14
        // make some language adjustments (there must be a better way)
15
        // transfer some DokuWiki language strings to the plugin
16
        $plugin->addLang($this->key . '_revisions', $lang['btn_revs']);
17
        foreach($this->choices as $choice) {
18
            if(isset($lang['btn_' . $choice])) $plugin->addLang($this->key . '_' . $choice, $lang['btn_' . $choice]);
19
        }
20
21
        return parent::html($plugin, $echo);
22
    }
23
}
24