Conditions | 4 |
Paths | 6 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function html(\admin_plugin_config $plugin, $echo = false) { |
||
11 | $disable = ''; |
||
12 | |||
13 | if($this->isProtected()) { |
||
14 | $value = $this->protected; |
||
15 | $disable = ' disabled="disabled"'; |
||
16 | } else { |
||
17 | $value = is_null($this->local) ? $this->default : $this->local; |
||
18 | } |
||
19 | |||
20 | $key = htmlspecialchars($this->key); |
||
21 | $checked = ($value) ? ' checked="checked"' : ''; |
||
22 | |||
23 | $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; |
||
24 | $input = '<div class="input"><input id="config___' . $key . '" name="config[' . $key . |
||
25 | ']" type="checkbox" class="checkbox" value="1"' . $checked . $disable . '/></div>'; |
||
26 | return array($label, $input); |
||
27 | } |
||
28 | |||
41 |