+ Add function to process formData before create.

This commit is contained in:
dingguodong
2023-05-11 15:19:34 +08:00
parent c93c5df56a
commit 45c447ab3c
+14
View File
@@ -10,6 +10,20 @@ declare(strict_types=1);
*/
class programplanZen extends programplan
{
/**
* Process formData before use it to create programplan.
*
* @param object $formData
* @access protected
* @return object
*/
protected function beforeCreate(object $formData): object
{
$formData->setIf(empty($formData->rawdata->codes), 'codes', array());
$formData->setIf(empty($formData->rawdata->output), 'output', array());
return $formData;
}
/**
* 处理编辑阶段的请求数据。
* Processing edit request data.