From d7c918893ab5a08681b610b306716db597e83ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 6 Jun 2025 17:55:37 +0900 Subject: [PATCH] dbms_init...1 --- app/Controllers/CommonController.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 2846391..7659915 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -263,6 +263,10 @@ abstract class CommonController extends BaseController try { //각 Field 초기화 $this->initAction(__FUNCTION__); + //FieldRule정의 + foreach ($this->getFormFields() as $field) { + $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); + } helper(['form']); //filter_fields에 해당하는 값이 있을 경우 정의 foreach ($this->getFilterFields() as $field) { @@ -290,6 +294,10 @@ abstract class CommonController extends BaseController try { //각 Field 초기화 $this->initAction(__FUNCTION__); + //FieldRule정의 + foreach ($this->getFormFields() as $field) { + $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); + } //입력값정의 $formDatas = []; foreach ($this->getFormFields() as $field) { @@ -314,6 +322,10 @@ abstract class CommonController extends BaseController try { //각 Field 초기화 $this->initAction(__FUNCTION__); + //FieldRule정의 + foreach ($this->getFormFields() as $field) { + $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); + } helper(['form']); //filter_fields에 해당하는 값이 있을 경우 정의 foreach ($this->getFilterFields() as $field) { @@ -353,6 +365,10 @@ abstract class CommonController extends BaseController } //각 Field 초기화 $this->initAction(__FUNCTION__); + //FieldRule정의 + foreach ($this->getFormFields() as $field) { + $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); + } //입력값정의 $formDatas = []; foreach ($this->getFormFields() as $field) { @@ -385,7 +401,9 @@ abstract class CommonController extends BaseController } //각 Field 초기화:Field는 한개만 존재하므로 Field와 Rule을 재정의 $this->setAction(__FUNCTION__); + //FormField정의 $this->setFormFields([$field]); + //FieldRule정의 $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); //입력값정의 $formDatas = [$field => $this->request->getVar($field)]; @@ -430,7 +448,9 @@ abstract class CommonController extends BaseController } //각 Field 초기화:Bachjob의 데이터가 있는경우 Field만 처리하기위해 Field와 Rule을 재정의 $this->setAction(__FUNCTION__); + //FormField정의 $this->setFormFields($fields); + //FieldRule정의 foreach ($this->getFormFields() as $field) { $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); } @@ -534,6 +554,10 @@ abstract class CommonController extends BaseController try { //각 Field 초기화 $this->initAction(__FUNCTION__); + //FieldRule정의 + foreach ($this->getViewFields() as $field) { + $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); + } helper(['form']); //기존 Entity 가져오기 $entity = $this->getService()->getEntity($uid); @@ -638,6 +662,10 @@ abstract class CommonController extends BaseController try { //각 Field 초기화 $this->initAction(__FUNCTION__); + //FieldRule정의 + foreach ($this->getIndexFields() as $field) { + $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); + } // 현재 URL을 스택에 저장 $this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : "")); helper(['form']);