dbms_init...1
This commit is contained in:
parent
d97d9c9c44
commit
1c7426a479
@ -145,7 +145,7 @@ abstract class CommonModel extends Model
|
||||
$entity->$field = htmlentities($formDatas[$field], ENT_QUOTES);
|
||||
break;
|
||||
default:
|
||||
if ($this->getFieldRule($action, $field) != "if_exist|numeric") {
|
||||
if ($this->getFormFieldRule($action, $field) != "if_exist|numeric") {
|
||||
if (array_key_exists($field, $formDatas) && $formDatas[$field] !== '') {
|
||||
$entity->$field = $formDatas[$field];
|
||||
}
|
||||
@ -180,7 +180,7 @@ abstract class CommonModel extends Model
|
||||
final function create(array $formDatas, mixed $entity): mixed
|
||||
{
|
||||
// Field에 맞는 Validation Rule 재정의
|
||||
$this->setValidationRules($this->getFieldRules(__FUNCTION__, $this->allowedFields));
|
||||
$this->setValidationRules($this->getFormFieldRules(__FUNCTION__, $this->allowedFields));
|
||||
LogCollector::debug("입력내용");
|
||||
LogCollector::debug(var_export($formDatas, true));
|
||||
foreach (array_keys($formDatas) as $field) {
|
||||
@ -204,7 +204,7 @@ abstract class CommonModel extends Model
|
||||
final function modify(mixed $entity, array $formDatas): mixed
|
||||
{
|
||||
// Field에 맞는 Validation Rule 재정의
|
||||
$this->setValidationRules($this->getFieldRules(__FUNCTION__, $this->allowedFields));
|
||||
$this->setValidationRules($this->getFormFieldRules(__FUNCTION__, $this->allowedFields));
|
||||
// 저장하기 전에 데이터 값 변경이 필요한 Field
|
||||
LogCollector::debug("[{$entity->getPK()}/{$entity->getTitle()}] 변경 전 내용");
|
||||
LogCollector::debug(var_export($formDatas, true));
|
||||
|
||||
@ -63,7 +63,7 @@ abstract class CommonService
|
||||
$entity = is_array($where) ? $this->getModel()->where($where)->first() : $this->getModel()->find($where);
|
||||
if (!$entity) {
|
||||
if ($isThrow) {
|
||||
throw new \Exception(__FUNCTION__ . " => 해당 정보를 찾을수 없습니다.");
|
||||
throw new \Exception(__METHOD__ . "에서 해당 정보를 찾을수 없습니다.");
|
||||
}
|
||||
}
|
||||
return $entity;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user