From eb25c8291a8b139da4a4182cfe2efe5546100b17 Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Fri, 22 Aug 2025 15:01:10 +0900 Subject: [PATCH] dbmsv2 init...1 --- app/Controllers/CommonController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index b5bf1bc..90d8b97 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -89,6 +89,10 @@ abstract class CommonController extends BaseController } return $action; } + final protected function setDefaultValue(string $field, mixed $value) + { + $this->_control['default_values'][$field] = $value; + } final protected function initAction(string $action, ?array $actionFields = null): void { $this->setAction($action); @@ -126,7 +130,7 @@ abstract class CommonController extends BaseController //Paramter로 전달된 Filter Options용 기본값 정의용 $this->_control['default_values'] = []; foreach ($this->getControlDatas('actionFilters') as $field) { - $this->_control['default_values'][$field] = $this->request->getVar($field); + $this->setDefaultValue($field, $this->request->getVar($field)); } // echo var_dump($actionFields); // echo var_dump($fields);