2023-12-26 00:44:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Form\Fields;
|
|
|
|
|
2023-12-26 20:06:57 +01:00
|
|
|
use Faker\Generator;
|
|
|
|
|
2023-12-26 00:44:49 +01:00
|
|
|
class TextareaField extends Field
|
|
|
|
{
|
|
|
|
public static function name(): string
|
|
|
|
{
|
|
|
|
return 'Textarea';
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function meta(): array
|
|
|
|
{
|
|
|
|
return [
|
2023-12-26 20:06:57 +01:00
|
|
|
['key' => 'rows', 'default' => 5, 'rules' => ['rows' => 'present|integer|gt:0'], 'label' => 'Zeilen'],
|
|
|
|
['key' => 'required', 'default' => false, 'rules' => ['required' => 'present|boolean'], 'label' => 'Erforderlich'],
|
2023-12-26 00:44:49 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function default(): string
|
|
|
|
{
|
|
|
|
return '';
|
|
|
|
}
|
2023-12-26 20:06:57 +01:00
|
|
|
|
|
|
|
public static function fake(Generator $faker): array
|
|
|
|
{
|
|
|
|
return [];
|
|
|
|
}
|
2023-12-26 00:44:49 +01:00
|
|
|
}
|