adrema/app/Form/FormSettings.php

55 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2024-05-27 19:47:28 +02:00
<?php
namespace App\Form;
use App\Form\Actions\SettingStoreAction;
use App\Setting\Contracts\Storeable;
use App\Setting\LocalSettings;
2024-08-01 13:33:28 +02:00
use Lorisleiva\Actions\ActionRequest;
2024-05-27 19:47:28 +02:00
2024-08-01 11:32:14 +02:00
class FormSettings extends LocalSettings implements Storeable
2024-05-27 19:47:28 +02:00
{
public string $registerUrl;
public string $clearCacheUrl;
2024-05-27 19:47:28 +02:00
public static function group(): string
{
return 'form';
}
public static function title(): string
{
return 'Formulare';
}
2024-08-01 13:33:28 +02:00
/**
* @inheritdoc
*/
public function rules(): array
{
return [
'registerUrl' => 'present|string',
'clearCacheUrl' => 'present|string',
];
}
public function beforeSave(ActionRequest $request): void
2024-05-27 19:47:28 +02:00
{
}
2024-08-01 11:17:49 +02:00
/**
* @inheritdoc
*/
public function viewData(): array
2024-05-27 19:47:28 +02:00
{
2024-08-01 11:17:49 +02:00
return [
'data' => [
'data' => [
2024-08-01 13:33:28 +02:00
'registerUrl' => $this->registerUrl,
'clearCacheUrl' => $this->clearCacheUrl,
2024-08-01 11:17:49 +02:00
]
]
];
2024-05-27 19:47:28 +02:00
}
}