mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
improve searchbox extra
This commit is contained in:
@@ -28,4 +28,15 @@ class EditSection extends EditRecord
|
||||
clear_search_box_cache($this->record->id);
|
||||
}
|
||||
|
||||
protected function mutateFormDataBeforeFill(array $data): array
|
||||
{
|
||||
foreach (SearchBox::$extras as $field => $text) {
|
||||
if (!empty($data['extra'][$field])) {
|
||||
$data['other'][] = $field;
|
||||
}
|
||||
unset($data['extra'][$field]);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user