@@ -32,10 +32,10 @@ |
||
32 | 32 | { |
33 | 33 | parent::__construct('input'); |
34 | 34 | |
35 | - if (isset($attributes[ 'id' ])) { |
|
36 | - $this->entity->setEntityName('input-' . $attributes[ 'id' ]); |
|
37 | - } elseif (isset($attributes[ 'name' ])) { |
|
38 | - $this->entity->setEntityName('input-' . $attributes[ 'name' ]); |
|
35 | + if (isset($attributes['id'])) { |
|
36 | + $this->entity->setEntityName('input-' . $attributes['id']); |
|
37 | + } elseif (isset($attributes['name'])) { |
|
38 | + $this->entity->setEntityName('input-' . $attributes['name']); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | if (count($attributes)) { |
@@ -33,10 +33,10 @@ |
||
33 | 33 | { |
34 | 34 | parent::__construct('output'); |
35 | 35 | |
36 | - if (isset($attributes[ 'id' ])) { |
|
37 | - $this->entity->setEntityName('output-' . $attributes[ 'id' ]); |
|
38 | - } elseif (isset($attributes[ 'name' ])) { |
|
39 | - $this->entity->setEntityName('output-' . $attributes[ 'name' ]); |
|
36 | + if (isset($attributes['id'])) { |
|
37 | + $this->entity->setEntityName('output-' . $attributes['id']); |
|
38 | + } elseif (isset($attributes['name'])) { |
|
39 | + $this->entity->setEntityName('output-' . $attributes['name']); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if (count($attributes)) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | $this->attributes->addAttributeClass(['custom-control', 'custom-checkbox']); |
34 | 34 | |
35 | - $attributes[ 'type' ] = 'checkbox'; |
|
35 | + $attributes['type'] = 'checkbox'; |
|
36 | 36 | |
37 | 37 | $checkbox = new Input(); |
38 | 38 | $checkbox->attributes->removeAttributeClass('form-control'); |
@@ -33,10 +33,10 @@ |
||
33 | 33 | { |
34 | 34 | parent::__construct('datalist'); |
35 | 35 | |
36 | - if (isset($attributes[ 'id' ])) { |
|
37 | - $this->entity->setEntityName('datalist-' . $attributes[ 'id' ]); |
|
38 | - } elseif (isset($attributes[ 'name' ])) { |
|
39 | - $this->entity->setEntityName('datalist-' . $attributes[ 'name' ]); |
|
36 | + if (isset($attributes['id'])) { |
|
37 | + $this->entity->setEntityName('datalist-' . $attributes['id']); |
|
38 | + } elseif (isset($attributes['name'])) { |
|
39 | + $this->entity->setEntityName('datalist-' . $attributes['name']); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if (count($attributes)) { |
@@ -32,10 +32,10 @@ |
||
32 | 32 | { |
33 | 33 | parent::__construct('textarea'); |
34 | 34 | |
35 | - if (isset($attributes[ 'id' ])) { |
|
36 | - $this->entity->setEntityName('textarea-' . $attributes[ 'id' ]); |
|
37 | - } elseif (isset($attributes[ 'name' ])) { |
|
38 | - $this->entity->setEntityName('textarea-' . $attributes[ 'name' ]); |
|
35 | + if (isset($attributes['id'])) { |
|
36 | + $this->entity->setEntityName('textarea-' . $attributes['id']); |
|
37 | + } elseif (isset($attributes['name'])) { |
|
38 | + $this->entity->setEntityName('textarea-' . $attributes['name']); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | if (count($attributes)) { |
@@ -36,10 +36,10 @@ |
||
36 | 36 | { |
37 | 37 | parent::__construct('select'); |
38 | 38 | |
39 | - if (isset($attributes[ 'id' ])) { |
|
40 | - $this->entity->setEntityName('select-' . $attributes[ 'id' ]); |
|
41 | - } elseif (isset($attributes[ 'name' ])) { |
|
42 | - $this->entity->setEntityName('select-' . $attributes[ 'name' ]); |
|
39 | + if (isset($attributes['id'])) { |
|
40 | + $this->entity->setEntityName('select-' . $attributes['id']); |
|
41 | + } elseif (isset($attributes['name'])) { |
|
42 | + $this->entity->setEntityName('select-' . $attributes['name']); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if (count($attributes)) { |
@@ -28,10 +28,10 @@ |
||
28 | 28 | { |
29 | 29 | parent::__construct('label'); |
30 | 30 | |
31 | - if (isset($attributes[ 'id' ])) { |
|
32 | - $this->entity->setEntityName('label-' . $attributes[ 'id' ]); |
|
33 | - } elseif (isset($attributes[ 'for' ])) { |
|
34 | - $this->entity->setEntityName('label-' . $attributes[ 'name' ]); |
|
31 | + if (isset($attributes['id'])) { |
|
32 | + $this->entity->setEntityName('label-' . $attributes['id']); |
|
33 | + } elseif (isset($attributes['for'])) { |
|
34 | + $this->entity->setEntityName('label-' . $attributes['name']); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if (count($attributes)) { |
@@ -55,8 +55,8 @@ |
||
55 | 55 | */ |
56 | 56 | public function createInput(array $attributes = []) |
57 | 57 | { |
58 | - if (isset($attributes[ 'type' ])) { |
|
59 | - switch ($attributes[ 'type' ]) { |
|
58 | + if (isset($attributes['type'])) { |
|
59 | + switch ($attributes['type']) { |
|
60 | 60 | default: |
61 | 61 | $input = new Form\Elements\Input($attributes); |
62 | 62 | break; |
@@ -42,10 +42,10 @@ |
||
42 | 42 | parent::__construct('button'); |
43 | 43 | $this->attributes->addAttribute('type', 'button'); |
44 | 44 | |
45 | - if (isset($attributes[ 'id' ])) { |
|
46 | - $this->entity->setEntityName('btn-' . $attributes[ 'id' ]); |
|
47 | - } elseif (isset($attributes[ 'name' ])) { |
|
48 | - $this->entity->setEntityName('btn-' . $attributes[ 'name' ]); |
|
45 | + if (isset($attributes['id'])) { |
|
46 | + $this->entity->setEntityName('btn-' . $attributes['id']); |
|
47 | + } elseif (isset($attributes['name'])) { |
|
48 | + $this->entity->setEntityName('btn-' . $attributes['name']); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if (count($attributes)) { |