dbms_init...1
This commit is contained in:
parent
136590ce6b
commit
a459cd300d
@ -110,6 +110,9 @@ abstract class CommonModel extends Model
|
|||||||
// create, modify 직전 작업용 작업
|
// create, modify 직전 작업용 작업
|
||||||
protected function convertEntityData(string $action, string $field, array $formDatas, mixed $entity): mixed
|
protected function convertEntityData(string $action, string $field, array $formDatas, mixed $entity): mixed
|
||||||
{
|
{
|
||||||
|
if (!array_key_exists($field, $formDatas)) {
|
||||||
|
return $entity;
|
||||||
|
}
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case $this->getPKField():
|
case $this->getPKField():
|
||||||
// $formDatas에 전달된 값이 없는 경우
|
// $formDatas에 전달된 값이 없는 경우
|
||||||
@ -133,9 +136,7 @@ abstract class CommonModel extends Model
|
|||||||
$entity->$field = htmlentities($formDatas[$field], ENT_QUOTES);
|
$entity->$field = htmlentities($formDatas[$field], ENT_QUOTES);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (array_key_exists($field, $formDatas)) {
|
|
||||||
$entity->$field = $formDatas[$field];
|
$entity->$field = $formDatas[$field];
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $entity;
|
return $entity;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user