Conditions | 4 |
Paths | 6 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function html(\admin_plugin_config $plugin, $echo = false) { |
||
28 | $disable = ''; |
||
29 | |||
30 | if($this->isProtected()) { |
||
31 | $value = $this->protected; |
||
32 | $disable = ' disabled="disabled"'; |
||
33 | } else { |
||
34 | $value = is_null($this->local) ? $this->default : $this->local; |
||
35 | } |
||
36 | |||
37 | $key = htmlspecialchars($this->key); |
||
38 | $checked = ($value) ? ' checked="checked"' : ''; |
||
39 | |||
40 | $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; |
||
41 | $input = '<div class="input"><input id="config___' . $key . '" name="config[' . $key . |
||
42 | ']" type="checkbox" class="checkbox" value="1"' . $checked . $disable . '/></div>'; |
||
43 | return array($label, $input); |
||
44 | } |
||
45 | |||
58 |