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