daemon-idc init
This commit is contained in:
parent
7bffcd2727
commit
83f0b1f88d
@ -10,9 +10,9 @@ class GoogleForm extends CommonForm
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
public function action_init_process(string $action, array &$formDatas = []): void
|
public function form_init_process(string $action, array &$formDatas = []): void
|
||||||
{
|
{
|
||||||
parent::action_init_process($action, $formDatas);
|
parent::form_init_process($action, $formDatas);
|
||||||
$fields = ['access_code'];
|
$fields = ['access_code'];
|
||||||
$filters = [];
|
$filters = [];
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|||||||
@ -10,9 +10,9 @@ class LocalForm extends CommonForm
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
public function action_init_process(string $action, array &$formDatas = []): void
|
public function form_init_process(string $action, array &$formDatas = []): void
|
||||||
{
|
{
|
||||||
parent::action_init_process($action, $formDatas);
|
parent::form_init_process($action, $formDatas);
|
||||||
$fields = ['id', 'passwd'];
|
$fields = ['id', 'passwd'];
|
||||||
$filters = [];
|
$filters = [];
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|||||||
@ -10,9 +10,9 @@ class BoardForm extends CommonForm
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
public function action_init_process(string $action, array &$formDatas = []): void
|
public function form_init_process(string $action, array &$formDatas = []): void
|
||||||
{
|
{
|
||||||
parent::action_init_process($action, $formDatas);
|
parent::form_init_process($action, $formDatas);
|
||||||
$fields = [
|
$fields = [
|
||||||
'category',
|
'category',
|
||||||
'worker_uid',
|
'worker_uid',
|
||||||
|
|||||||
@ -38,7 +38,7 @@ abstract class CommonForm
|
|||||||
$this->validation = service('validation');
|
$this->validation = service('validation');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function action_init_process(string $action, array &$formDatas = []): void
|
public function form_init_process(string $action, array &$formDatas = []): void
|
||||||
{
|
{
|
||||||
$this->_action = $action;
|
$this->_action = $action;
|
||||||
$actionButtons = ['view' => ICONS['SEARCH'], 'delete' => ICONS['DELETE']];
|
$actionButtons = ['view' => ICONS['SEARCH'], 'delete' => ICONS['DELETE']];
|
||||||
|
|||||||
@ -11,9 +11,9 @@ class InquiryForm extends CommonForm
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
public function action_init_process(string $action, array &$formDatas = []): void
|
public function form_init_process(string $action, array &$formDatas = []): void
|
||||||
{
|
{
|
||||||
parent::action_init_process($action, $formDatas);
|
parent::form_init_process($action, $formDatas);
|
||||||
$fields = [
|
$fields = [
|
||||||
'title',
|
'title',
|
||||||
'email',
|
'email',
|
||||||
|
|||||||
@ -10,9 +10,9 @@ class UserForm extends CommonForm
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
public function action_init_process(string $action, array &$formDatas = []): void
|
public function form_init_process(string $action, array &$formDatas = []): void
|
||||||
{
|
{
|
||||||
parent::action_init_process($action, $formDatas);
|
parent::form_init_process($action, $formDatas);
|
||||||
$fields = [
|
$fields = [
|
||||||
'id',
|
'id',
|
||||||
'passwd',
|
'passwd',
|
||||||
|
|||||||
@ -239,7 +239,7 @@ abstract class CommonService
|
|||||||
if (!$actionForm instanceof CommonForm) {
|
if (!$actionForm instanceof CommonForm) {
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: actionForm이 정의되지 않았습니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: actionForm이 정의되지 않았습니다.");
|
||||||
}
|
}
|
||||||
$actionForm->action_init_process('create', $formDatas);
|
$actionForm->form_init_process('create', $formDatas);
|
||||||
$actionForm->validate($formDatas); // ✅ 여기서 검증
|
$actionForm->validate($formDatas); // ✅ 여기서 검증
|
||||||
// 검증 통과 후 엔티티 반영용
|
// 검증 통과 후 엔티티 반영용
|
||||||
foreach ($formDatas as $field => $value) {
|
foreach ($formDatas as $field => $value) {
|
||||||
@ -280,7 +280,7 @@ abstract class CommonService
|
|||||||
if (!$actionForm instanceof CommonForm) {
|
if (!$actionForm instanceof CommonForm) {
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: actionForm이 정의되지 않았습니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: actionForm이 정의되지 않았습니다.");
|
||||||
}
|
}
|
||||||
$actionForm->action_init_process('modify', $formDatas);
|
$actionForm->form_init_process('modify', $formDatas);
|
||||||
$actionForm->validate($formDatas); // ✅ 여기서 검증
|
$actionForm->validate($formDatas); // ✅ 여기서 검증
|
||||||
// 검증 통과 후 엔티티 반영
|
// 검증 통과 후 엔티티 반영
|
||||||
foreach ($formDatas as $field => $value) {
|
foreach ($formDatas as $field => $value) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user