adrema/app/Prevention/PreventionSettings.php

42 lines
769 B
PHP

<?php
namespace App\Prevention;
use App\Lib\Editor\EditorData;
use App\Setting\Contracts\Storeable;
use App\Setting\LocalSettings;
use Lorisleiva\Actions\ActionRequest;
class PreventionSettings extends LocalSettings implements Storeable
{
public EditorData $formmail;
public static function group(): string
{
return 'prevention';
}
public static function title(): string
{
return 'Prävention';
}
/**
* @inheritdoc
*/
public function rules(): array
{
return [
'formmail' => 'required',
];
}
public function saveAttributes(ActionRequest $request): array
{
return [
'formmail' => EditorData::from($request->formmail),
];
}
}