| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Textarea extends Component |
||
| 10 | { |
||
| 11 | public string $uuid; |
||
| 12 | |||
| 13 | public function __construct( |
||
| 14 | public ?string $label = null, |
||
| 15 | public ?string $hint = null, |
||
| 16 | public ?string $hintClass = 'fieldset-label', |
||
| 17 | public ?bool $inline = false, |
||
| 18 | |||
| 19 | // Validations |
||
| 20 | public ?string $errorClass = 'text-error', |
||
| 21 | public ?bool $omitError = false, |
||
| 22 | public ?bool $firstErrorOnly = false, |
||
| 23 | ) { |
||
| 24 | $this->uuid = md5(serialize($this)); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function modelName(): ?string |
||
| 28 | { |
||
| 29 | return $this->attributes->whereStartsWith('wire:model')->first(); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function errorFieldName(): ?string |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the view / contents that represent the component. |
||
| 39 | */ |
||
| 40 | public function render(): View|Closure|string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |