Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function render() { |
||
17 | $html = '<select ' . $this->getAttributesAsString() . ' >'; |
||
18 | $currentValue = $this->getValue(); |
||
19 | |||
20 | foreach ($this->options as $value => $text) { |
||
21 | $html .= '<option' |
||
22 | . ($currentValue == $value ? ' selected="1" ' : '') |
||
23 | . ' value="' . $value . '"' |
||
24 | . '>' |
||
25 | . $text |
||
26 | . '</option>'; |
||
27 | } |
||
28 | $html .= '</select>'; |
||
29 | return $html; |
||
30 | } |
||
31 | |||
32 | } |