48 lines
975 B
PHP
48 lines
975 B
PHP
<?php
|
|
|
|
namespace App\Prevention;
|
|
|
|
use App\Lib\Editor\EditorData;
|
|
use App\Setting\LocalSettings;
|
|
|
|
class PreventionSettings extends LocalSettings
|
|
{
|
|
|
|
public EditorData $formmail;
|
|
public EditorData $yearlymail;
|
|
public int $weeks;
|
|
public int $freshRememberInterval;
|
|
public bool $active;
|
|
|
|
public static function group(): string
|
|
{
|
|
return 'prevention';
|
|
}
|
|
|
|
public static function title(): string
|
|
{
|
|
return 'Prävention';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function viewData(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* @todo return int value here and handle this in vue with a number field that only expects integers
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toFrontend(): array
|
|
{
|
|
return [
|
|
...$this->toArray(),
|
|
'weeks' => (string) $this->weeks,
|
|
'freshRememberInterval' => (string) $this->freshRememberInterval,
|
|
];
|
|
}
|
|
}
|