adrema/app/Prevention/PreventionSettings.php

42 lines
769 B
PHP
Raw Permalink Normal View History

2024-07-04 21:01:14 +02:00
<?php
namespace App\Prevention;
2024-07-04 23:54:37 +02:00
use App\Lib\Editor\EditorData;
2024-08-01 17:30:55 +02:00
use App\Setting\Contracts\Storeable;
2024-07-04 21:01:14 +02:00
use App\Setting\LocalSettings;
2024-08-01 17:30:55 +02:00
use Lorisleiva\Actions\ActionRequest;
2024-07-04 21:01:14 +02:00
2024-08-01 17:30:55 +02:00
class PreventionSettings extends LocalSettings implements Storeable
2024-07-04 21:01:14 +02:00
{
2024-07-04 23:54:37 +02:00
public EditorData $formmail;
2024-07-04 21:01:14 +02:00
public static function group(): string
{
return 'prevention';
}
2024-08-01 11:17:49 +02:00
public static function title(): string
2024-07-04 21:01:14 +02:00
{
2024-08-01 11:17:49 +02:00
return 'Prävention';
2024-07-04 21:01:14 +02:00
}
2024-08-01 17:30:55 +02:00
/**
* @inheritdoc
*/
public function rules(): array
{
return [
'formmail' => 'required',
];
}
public function saveAttributes(ActionRequest $request): array
{
return [
'formmail' => EditorData::from($request->formmail),
];
}
2024-07-04 21:01:14 +02:00
}