2022-09-06 20:45:29 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Filament\Resources\System\SectionResource\Pages;
|
|
|
|
|
|
2022-10-27 20:21:54 +08:00
|
|
|
use App\Filament\Resources\Section\SectionResource;
|
2022-09-06 20:45:29 +08:00
|
|
|
use App\Models\SearchBox;
|
|
|
|
|
use Filament\Pages\Actions;
|
|
|
|
|
use Filament\Resources\Pages\EditRecord;
|
|
|
|
|
|
|
|
|
|
class EditSection extends EditRecord
|
|
|
|
|
{
|
|
|
|
|
protected static string $resource = SectionResource::class;
|
|
|
|
|
|
|
|
|
|
protected function getActions(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
Actions\DeleteAction::make(),
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function mutateFormDataBeforeSave(array $data): array
|
|
|
|
|
{
|
2022-09-13 19:21:05 +08:00
|
|
|
return SearchBox::formatTaxonomyExtra($data);
|
2022-09-07 17:10:52 +08:00
|
|
|
}
|
|
|
|
|
|
2022-09-14 19:05:29 +08:00
|
|
|
protected function afterSave()
|
|
|
|
|
{
|
|
|
|
|
clear_search_box_cache($this->record->id);
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-06 20:45:29 +08:00
|
|
|
}
|