dbms_init...1
This commit is contained in:
parent
7da85fac45
commit
daa4d81c80
@ -71,7 +71,7 @@ abstract class CustomerController extends AdminController
|
||||
}
|
||||
return $this->_equipmentService[$key];
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options = []): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
@ -98,7 +98,7 @@ abstract class CustomerController extends AdminController
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
$options = parent::getFormFieldOption($field);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -46,7 +46,7 @@ class ServiceItemController extends CustomerController
|
||||
return $this->_serviceService;
|
||||
}
|
||||
|
||||
protected function getFormFieldOption(string $field, array $options = []): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'serviceinfo_uid':
|
||||
@ -69,7 +69,7 @@ class ServiceItemController extends CustomerController
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
$options = parent::getFormFieldOption($field);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -23,7 +23,7 @@ abstract class EquipmentController extends AdminController
|
||||
return $this->_clientService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
@ -34,7 +34,7 @@ abstract class EquipmentController extends AdminController
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
$options = parent::getFormFieldOption($field);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -44,7 +44,7 @@ class IpController extends PartController
|
||||
}
|
||||
return $this->_lineService;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'lineinfo_uid':
|
||||
@ -55,7 +55,7 @@ class IpController extends PartController
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
$options = parent::getFormFieldOption($field);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -14,7 +14,7 @@ abstract class PartController extends EquipmentController
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
@ -25,7 +25,7 @@ abstract class PartController extends EquipmentController
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
$options = parent::getFormFieldOption($field);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -46,7 +46,7 @@ class MyLogController extends AdminController
|
||||
return $this->_userService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'user_uid':
|
||||
@ -54,10 +54,10 @@ class MyLogController extends AdminController
|
||||
foreach ($this->getUserService()->getEntities() as $entity) {
|
||||
$temps[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
$options[$field] = $temps;
|
||||
$options = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
$options = parent::getFormFieldOption($field);
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -174,16 +174,17 @@ abstract class CommonController extends BaseController
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
protected function getFormFieldOption(string $field, array $options): array
|
||||
protected function getFormFieldOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
default:
|
||||
$options[$field] = lang($this->getService()->getClassName() . '.' . strtoupper($field));
|
||||
$options = lang($this->getService()->getClassName() . '.' . strtoupper($field));
|
||||
break;
|
||||
}
|
||||
if (!is_array($options)) {
|
||||
throw new \Exception(__FUNCTION__ . "에서 field의 options 값이 array가 아닙니다.\n" . var_export($options, true));
|
||||
}
|
||||
// dd($options);
|
||||
return $options;
|
||||
}
|
||||
protected function setValidation(Validation $validation, string $field, string $rule): Validation
|
||||
@ -240,6 +241,7 @@ abstract class CommonController extends BaseController
|
||||
case 'index':
|
||||
case 'view':
|
||||
$this->control = $this->_control;
|
||||
// dd($this->control);
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . $this->getAction(), [
|
||||
'viewDatas' => $this->getViewDatas()
|
||||
|
||||
@ -221,19 +221,19 @@ class CommonHelper
|
||||
$form = form_input($field, $value ?? "", ["placeholder" => "예)010-0010-0010", ...$extras]);
|
||||
break;
|
||||
case 'role':
|
||||
if (!is_array($viewDatas['control']['field_options'][$field])) {
|
||||
if (!is_array($viewDatas['control']['filter_optons'][$field])) {
|
||||
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
|
||||
}
|
||||
if (in_array($viewDatas['control']['action'], ['create', 'modify', 'create_form', 'modify_form'])) {
|
||||
$forms = [];
|
||||
foreach ($viewDatas['control']['field_options'][$field] as $key => $label) {
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $label) {
|
||||
$values = is_array($value) ? $value : explode(DEFAULTS["DELIMITER_ROLE"], $value);
|
||||
$forms[] = form_checkbox("{$field}[]", $key, in_array($key, $values)) . $label;
|
||||
}
|
||||
$form = implode(" ", $forms);
|
||||
} else {
|
||||
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
||||
foreach ($viewDatas['control']['field_options'][$field] as $key => $label) {
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $label) {
|
||||
$formOptions[$key] = $label;
|
||||
}
|
||||
$form = form_dropdown($field, $formOptions, $value, $extras);
|
||||
@ -256,13 +256,13 @@ class CommonHelper
|
||||
case 'status':
|
||||
if (in_array($viewDatas['control']['action'], ['create', 'modify', 'create_form', 'modify_form'])) {
|
||||
$forms = [];
|
||||
foreach ($viewDatas['control']['field_options'][$field] as $key => $label) {
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $label) {
|
||||
$forms[] = form_radio($label, $key, $key == $value) . $label;
|
||||
}
|
||||
$form = implode(" ", $forms);
|
||||
} else {
|
||||
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
||||
foreach ($viewDatas['control']['field_options'][$field] as $key => $label) {
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $label) {
|
||||
$formOptions[$key] = $label;
|
||||
}
|
||||
$form = form_dropdown($field, $formOptions, $value, $extras);
|
||||
@ -270,11 +270,11 @@ class CommonHelper
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (!is_array($viewDatas['control']['field_options'][$field])) {
|
||||
if (!is_array($viewDatas['control']['filter_optons'][$field])) {
|
||||
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
|
||||
}
|
||||
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
|
||||
foreach ($viewDatas['control']['field_options'][$field] as $key => $label) {
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $label) {
|
||||
$formOptions[$key] = $label;
|
||||
}
|
||||
$form = form_dropdown($field, $formOptions, $value, $extras);
|
||||
@ -293,7 +293,7 @@ class CommonHelper
|
||||
case 'role':
|
||||
$roles = [];
|
||||
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {
|
||||
$roles[] = $viewDatas['control']['field_options'][$field][$key] ?? "";
|
||||
$roles[] = $viewDatas['control']['filter_optons'][$field][$key] ?? "";
|
||||
}
|
||||
$value = implode(" , ", $roles);
|
||||
break;
|
||||
|
||||
@ -59,7 +59,7 @@ class ServiceHelper extends CustomerHelper
|
||||
case "DOMAIN":
|
||||
$temps = ["<ol>"];
|
||||
foreach ($viewDatas['entity']->getItemEntities($field) as $itemEntity) {
|
||||
$temps[] = "<li title=\"" . $itemEntity->getView_Price() . "\">" . $viewDatas['control']['field_options'][$field][$itemEntity->getItemUid()] . ' ' . $itemEntity->getView_BillingCycle() . ' ' . $itemEntity->getView_Sale() . "</li>";
|
||||
$temps[] = "<li title=\"" . $itemEntity->getView_Price() . "\">" . $viewDatas['control']['filter_optons'][$field][$itemEntity->getItemUid()] . ' ' . $itemEntity->getView_BillingCycle() . ' ' . $itemEntity->getView_Sale() . "</li>";
|
||||
}
|
||||
$temps[] = "</ol>";
|
||||
$value = implode("", $temps);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user