@@ 13-29 (lines=17) @@ | ||
10 | * |
|
11 | * @package Itstructure\FieldWidgets |
|
12 | */ |
|
13 | class FieldTypeText extends FieldType |
|
14 | { |
|
15 | /** |
|
16 | * @return string |
|
17 | */ |
|
18 | public function run(): string |
|
19 | { |
|
20 | return $this->getField() |
|
21 | ->textInput( |
|
22 | ArrayHelper::merge( |
|
23 | [ |
|
24 | 'maxlength' => true, |
|
25 | 'style' => 'width: 50%;' |
|
26 | ], |
|
27 | $this->getOptions() |
|
28 | ) |
|
29 | ) |
|
30 | ->label($this->getLabel()); |
|
31 | } |
|
32 | } |
@@ 13-29 (lines=17) @@ | ||
10 | * |
|
11 | * @package Itstructure\FieldWidgets |
|
12 | */ |
|
13 | class FieldTypeTextArea extends FieldType |
|
14 | { |
|
15 | /** |
|
16 | * @return string |
|
17 | */ |
|
18 | public function run(): string |
|
19 | { |
|
20 | return $this->getField() |
|
21 | ->textarea( |
|
22 | ArrayHelper::merge( |
|
23 | [ |
|
24 | 'rows' => 10, |
|
25 | 'cols' => 80 |
|
26 | ], |
|
27 | $this->getOptions() |
|
28 | ) |
|
29 | ) |
|
30 | ->label($this->getLabel()); |
|
31 | } |
|
32 | } |