Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
31 | 24 | public function renderFieldBlock() |
|
32 | { |
||
33 | // Set form group div properties |
||
34 | 24 | $formGroup = $this->block; |
|
35 | 24 | $class = $formGroup->getAttribute('class').'form-group'; |
|
36 | 24 | $formGroup->setAttribute('class', $class); |
|
37 | 24 | $formGroup->setAttribute('id', $this->field->getName().'-form-group'); |
|
38 | |||
39 | 24 | $formGroup->appendChild($this->label); |
|
40 | |||
41 | 24 | $formGroup->appendChild($this->element); |
|
42 | |||
43 | 24 | if (!is_null($this->errors)) { |
|
44 | 3 | $formGroup->appendChild($this->errors); |
|
45 | } |
||
46 | |||
47 | // Field rendered! Pass it back! |
||
48 | 24 | return $formGroup; |
|
49 | } |
||
52 |