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

SettingDisableactions   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A html() 0 12 3
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