Conditions | 3 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 3.0026 |
Changes | 0 |
1 | <?php |
||
39 | 2 | public function getHTML() |
|
40 | { |
||
41 | 2 | $details = $this->getHTMLDetails(); |
|
42 | 2 | extract($details); |
|
|
|||
43 | |||
44 | 2 | $options = null; |
|
45 | 2 | foreach ($this['options'] as $optValue => $optText) { |
|
46 | 1 | $options .= "<option value='{$optValue}'" |
|
47 | 1 | . (($this['value'] == $optValue) |
|
48 | ? " selected=\"selected\"" |
||
49 | 1 | : null) |
|
50 | 1 | . ">{$optText}</option>\n"; |
|
51 | } |
||
52 | |||
53 | return <<<EOD |
||
54 | <p> |
||
55 | 2 | <label for='$id'>$label</label>$brAfterLabel |
|
56 | 2 | <select id='$id'{$class}{$name}{$autofocus}{$required}{$readonly}{$checked}{$title}> |
|
57 | 2 | {$options} |
|
58 | </select> |
||
59 | 2 | {$messages} |
|
60 | </p> |
||
61 | 2 | <p class='cf-desc'>{$description}</p> |
|
62 | EOD; |
||
65 |