dbms_init...1
This commit is contained in:
parent
d7c918893a
commit
1381aef94a
@ -75,11 +75,10 @@ abstract class CustomerController extends AdminController
|
||||
{
|
||||
switch ($field) {
|
||||
case 'clientinfo_uid':
|
||||
$temps = [];
|
||||
$options = [];
|
||||
foreach ($this->getClientService()->getEntities() as $entity) {
|
||||
$temps[$entity->getPK()] = $entity->getTitle();
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
case 'SERVER':
|
||||
case 'CPU':
|
||||
@ -90,12 +89,11 @@ abstract class CustomerController extends AdminController
|
||||
case 'DEFENCE':
|
||||
case 'SOFTWARE':
|
||||
case 'DOMAIN':
|
||||
$temps = [];
|
||||
$options = [];
|
||||
// throw new \Exception(__FUNCTION__ . "에서 item_type이 지정되지 않았습니다.->{$item_type}");
|
||||
foreach ($this->getEquipmentService($field)->getEntities() as $entity) {
|
||||
$temps[$entity->getPK()] = $entity->getTitle();
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
$options[$field] = $temps;
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field);
|
||||
|
||||
@ -49,7 +49,7 @@ class ServiceController extends CustomerController
|
||||
{
|
||||
switch ($this->getAction()) {
|
||||
case 'index':
|
||||
$this->control = $this->_control;
|
||||
$this->control = $this->getControlDatas();
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . 'service' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]);
|
||||
break;
|
||||
@ -65,13 +65,15 @@ class ServiceController extends CustomerController
|
||||
//추가 Field작업 처리
|
||||
$this->item_types = lang($this->getServiceItemService()->getClassName() . '.' . strtoupper('ITEM_TYPE'));
|
||||
foreach ($this->item_types as $field => $label) {
|
||||
$this->field_options = $this->getFormFieldOption($field, $this->field_options);
|
||||
$this->setFilterFieldOption($field, $this->getFormFieldOption($field));
|
||||
}
|
||||
$entities = [];
|
||||
foreach (parent::index_process() as $entity) {
|
||||
foreach ($this->item_types as $field => $label) {
|
||||
$itemEntities = $this->getServiceItemService()->getEntities(['item_type' => $field]);
|
||||
$entity->setItemEntities($field, $itemEntities);
|
||||
$entity->setItemEntities(
|
||||
$field,
|
||||
$this->getServiceItemService()->getEntities(['item_type' => $field])
|
||||
);
|
||||
}
|
||||
$entities[] = $entity;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ class ServiceItemController extends CustomerController
|
||||
{
|
||||
switch ($this->getAction()) {
|
||||
case 'index':
|
||||
$this->control = $this->_control;
|
||||
$this->control = $this->getControlDatas();
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . 'popup' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]);
|
||||
break;
|
||||
|
||||
@ -66,6 +66,10 @@ abstract class CommonController extends BaseController
|
||||
return $this->_myLogService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
final protected function getControlDatas(): array
|
||||
{
|
||||
return $this->_control;
|
||||
}
|
||||
final protected function setAction(string $action): void
|
||||
{
|
||||
$this->_control['action'] = $action;
|
||||
@ -241,8 +245,7 @@ abstract class CommonController extends BaseController
|
||||
case 'login_form':
|
||||
case 'index':
|
||||
case 'view':
|
||||
$this->control = $this->_control;
|
||||
// dd($this->control);
|
||||
$this->control = $this->getControlDatas();
|
||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||
$result = view($this->view_path . $this->getAction(), [
|
||||
'viewDatas' => $this->getViewDatas()
|
||||
|
||||
@ -12,12 +12,9 @@ class ServiceEntity extends CustomerEntity
|
||||
{
|
||||
return $this->attributes[$type] ?? [];
|
||||
}
|
||||
public function setItemEntities(string $type, array $partEntities): void
|
||||
public function setItemEntities(string $type, array $itemEntities): void
|
||||
{
|
||||
if (!isset($this->attributes[$type])) {
|
||||
$this->attributes[$type] = [];
|
||||
}
|
||||
$this->attributes[$type] = $partEntities;
|
||||
$this->attributes[$type] = $itemEntities;
|
||||
// $this->attributes[$type] = array_unique($this->attributes[$type], SORT_REGULAR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,13 @@ class ServiceHelper extends CustomerHelper
|
||||
case "DOMAIN":
|
||||
$temps = ["<ol>"];
|
||||
foreach ($viewDatas['entity']->getItemEntities($field) as $itemEntity) {
|
||||
$temps[] = "<li title=\"" . $itemEntity->getView_Price() . "\">" . $viewDatas['control']['filter_optons'][$field][$itemEntity->getItemUid()] . ' ' . $itemEntity->getView_BillingCycle() . ' ' . $itemEntity->getView_Sale() . "</li>";
|
||||
$temps[] = sprintf(
|
||||
"<li title=\"%s\">%s %s %s</li>",
|
||||
$itemEntity->getView_Price(),
|
||||
$viewDatas['control']['filter_optons'][$field][$itemEntity->getItemUid()],
|
||||
$itemEntity->getView_BillingCycle(),
|
||||
$itemEntity->getView_Sale()
|
||||
);
|
||||
}
|
||||
$temps[] = "</ol>";
|
||||
$value = implode("", $temps);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user