@@ -20,10 +20,10 @@ |
||
20 | 20 | * @param LabelGenerator|string $label |
21 | 21 | * @param AttributesBuilder|array $attributes |
22 | 22 | */ |
23 | - public function __construct($label, $attributes=[]) |
|
23 | + public function __construct($label, $attributes = []) |
|
24 | 24 | { |
25 | 25 | parent::__construct($label, $attributes); |
26 | - $this->Attributes()->set('type','text'); |
|
26 | + $this->Attributes()->set('type', 'text'); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -17,10 +17,10 @@ |
||
17 | 17 | * @param array $options |
18 | 18 | * @param array $attributes |
19 | 19 | */ |
20 | - public function __construct($label, array $options, array $attributes=[]) |
|
20 | + public function __construct($label, array $options, array $attributes = []) |
|
21 | 21 | { |
22 | 22 | parent::__construct($label, $options, $attributes); |
23 | - $this->Attributes()->set('type','radio'); |
|
23 | + $this->Attributes()->set('type', 'radio'); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function __construct($label, $attributes) |
15 | 15 | { |
16 | 16 | parent::__construct($label, $attributes); |
17 | - $this->Attributes()->set('type','tel'); |
|
17 | + $this->Attributes()->set('type', 'tel'); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -13,9 +13,9 @@ |
||
13 | 13 | public function __construct($label, $attributes) |
14 | 14 | { |
15 | 15 | parent::__construct($label, $attributes); |
16 | - $this->Attributes()->set('type','email'); |
|
17 | - $this->Attributes()->set('placeholder','[email protected]'); |
|
18 | - $this->Attributes()->set('pattern','[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,}|[.]{1}[a-zA-Z]{2,}[.]{1}[a-zA-Z]{2,})'); |
|
16 | + $this->Attributes()->set('type', 'email'); |
|
17 | + $this->Attributes()->set('placeholder', '[email protected]'); |
|
18 | + $this->Attributes()->set('pattern', '[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,}|[.]{1}[a-zA-Z]{2,}[.]{1}[a-zA-Z]{2,})'); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -16,9 +16,9 @@ |
||
16 | 16 | public function __construct($label, $attributes) |
17 | 17 | { |
18 | 18 | parent::__construct($label, $attributes); |
19 | - $this->Attributes()->set('type','color'); |
|
20 | - $this->Attributes()->set('title','6-digit hexidecimal color (e.g. #000000)'); |
|
21 | - $this->Attributes()->set('pattern','#[a-g0-9]{6}'); |
|
19 | + $this->Attributes()->set('type', 'color'); |
|
20 | + $this->Attributes()->set('title', '6-digit hexidecimal color (e.g. #000000)'); |
|
21 | + $this->Attributes()->set('pattern', '#[a-g0-9]{6}'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function __construct($label, $attributes = []) |
15 | 15 | { |
16 | 16 | parent::__construct($label, $attributes); |
17 | - $this->Attributes()->set('type','time'); |
|
17 | + $this->Attributes()->set('type', 'time'); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function __construct($label, $attributes) |
20 | 20 | { |
21 | 21 | parent::__construct($label, $attributes); |
22 | - $this->Attributes()->set('accept','image/*'); |
|
22 | + $this->Attributes()->set('accept', 'image/*'); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function __construct($label, array $options = [], $attributes) |
17 | 17 | { |
18 | 18 | parent::__construct($label, $attributes); |
19 | - $this->listname = 'datalist-' . $this->Attributes()->get('id'); |
|
19 | + $this->listname = 'datalist-'.$this->Attributes()->get('id'); |
|
20 | 20 | $this->Attributes()->set('list', $this->listname); |
21 | 21 | $this->options = array_values($options); |
22 | 22 | } |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | public function RenderHtml(): string |
28 | 28 | { |
29 | 29 | $html = parent::RenderHtml(); |
30 | - $html .= '<datalist id="'. $this->listname.'">'; |
|
31 | - foreach( $this->options as $option) |
|
30 | + $html .= '<datalist id="'.$this->listname.'">'; |
|
31 | + foreach ($this->options as $option) |
|
32 | 32 | { |
33 | - if(!$option = trim(strip_tags($option))) continue; |
|
33 | + if (!$option = trim(strip_tags($option))) continue; |
|
34 | 34 | $html .= '<option value="'.$option.'">'; |
35 | 35 | } |
36 | 36 | $html .= '</datalist>'; |
@@ -30,7 +30,9 @@ |
||
30 | 30 | $html .= '<datalist id="'. $this->listname.'">'; |
31 | 31 | foreach( $this->options as $option) |
32 | 32 | { |
33 | - if(!$option = trim(strip_tags($option))) continue; |
|
33 | + if(!$option = trim(strip_tags($option))) { |
|
34 | + continue; |
|
35 | + } |
|
34 | 36 | $html .= '<option value="'.$option.'">'; |
35 | 37 | } |
36 | 38 | $html .= '</datalist>'; |
@@ -11,10 +11,10 @@ |
||
11 | 11 | |
12 | 12 | class Submit extends Button |
13 | 13 | { |
14 | - public function __construct($label, $attributes =[]) |
|
14 | + public function __construct($label, $attributes = []) |
|
15 | 15 | { |
16 | 16 | parent::__construct($label, $attributes); |
17 | - $this->Attributes()->set('type','submit'); |
|
17 | + $this->Attributes()->set('type', 'submit'); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | } |
21 | 21 | \ No newline at end of file |