taxonomy create/edit redirect

This commit is contained in:
xiaomlove
2022-11-09 21:56:03 +08:00
parent b92b911b1e
commit 6479f0a799
17 changed files with 105 additions and 20 deletions

View File

@@ -23,6 +23,17 @@ class EditCodec extends EditRecord
public function afterSave()
{
clear_search_box_cache();
$model = static::$resource::getModel();
$table = (new $model)->getTable();
clear_taxonomy_cache($table);
}
protected function mutateFormDataBeforeSave(array $data): array
{
if ($data['mode'] === null) {
$data['mode'] = 0;
}
return $data;
}
}