|
5 | 5 | use Filament\Actions\Action; |
6 | 6 | use Filament\Actions\ActionGroup; |
7 | 7 | use Filament\Forms\Contracts\HasForms; |
8 | | -use Filament\Forms\Form; |
9 | 8 | use Filament\Notifications\Notification; |
10 | | -use Filament\Pages\Concerns; |
| 9 | +use Filament\Pages\Concerns\InteractsWithFormActions; |
11 | 10 | use Filament\Pages\Page; |
| 11 | +use Filament\Schemas\Schema; |
12 | 12 | use Filament\Support\Exceptions\Halt; |
13 | 13 | use Glorand\Model\Settings\Contracts\SettingsManagerContract; |
14 | 14 | use Quadrubo\FilamentModelSettings\Exceptions\HasModelSettingsNotImplementedException; |
15 | 15 | use Quadrubo\FilamentModelSettings\Pages\Contracts\HasModelSettings; |
16 | 16 |
|
17 | 17 | class ModelSettingsPage extends Page implements HasForms |
18 | 18 | { |
19 | | - use Concerns\InteractsWithFormActions; |
| 19 | + use InteractsWithFormActions; |
20 | 20 |
|
21 | | - protected static string $view = 'filament-model-settings::pages.model-settings-page'; |
| 21 | + protected string $view = 'filament-model-settings::pages.model-settings-page'; |
22 | 22 |
|
23 | 23 | /** |
24 | 24 | * @var array<string, mixed> | null |
@@ -147,24 +147,12 @@ public function getSubmitFormAction(): Action |
147 | 147 | return $this->getSaveFormAction(); |
148 | 148 | } |
149 | 149 |
|
150 | | - public function form(Form $form): Form |
| 150 | + public function form(Schema $schema): Schema |
151 | 151 | { |
152 | | - return $form; |
153 | | - } |
154 | | - |
155 | | - /** |
156 | | - * @return array<int | string, string | Form> |
157 | | - */ |
158 | | - protected function getForms(): array |
159 | | - { |
160 | | - return [ |
161 | | - 'form' => $this->form( |
162 | | - $this->makeForm() |
163 | | - ->statePath('data') |
164 | | - ->columns(2) |
165 | | - ->inlineLabel($this->hasInlineLabels()), |
166 | | - ), |
167 | | - ]; |
| 152 | + return $schema |
| 153 | + ->statePath('data') |
| 154 | + ->columns(2) |
| 155 | + ->inlineLabel($this->hasInlineLabels()); |
168 | 156 | } |
169 | 157 |
|
170 | 158 | public function getRedirectUrl(): ?string |
|
0 commit comments