| Conditions | 4 |
| Paths | 3 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function create() |
||
| 25 | { |
||
| 26 | parent::create(); |
||
| 27 | |||
| 28 | $output = '<' . $this->inputType . ' '; |
||
| 29 | |||
| 30 | foreach ($this->definition['attributes'] as $attr => $value) { |
||
| 31 | |||
| 32 | if (!empty($this->getValue()) && $attr === 'value') { |
||
| 33 | continue; |
||
| 34 | } |
||
| 35 | |||
| 36 | $output .= $attr . '="' . $value . '" '; |
||
| 37 | |||
| 38 | } |
||
| 39 | |||
| 40 | $output .= '/>'; |
||
| 41 | |||
| 42 | $this->element = $output; |
||
| 43 | |||
| 44 | return $this; |
||
| 45 | } |
||
| 46 | |||
| 47 | } |