content_title = lang("{$this->getService()->getClassName()}.title"); $this->class_path .= $this->getService()->getClassName(); $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; } public function getService(): ServicePaymentService { if (!$this->_service) { $this->_service = new ServicePaymentService($this->request); } return $this->_service; } public function getHelper(): ServicePaymentHelper { if (!$this->_helper) { $this->_helper = new ServicePaymentHelper($this->request); } return $this->_helper; } public function getServiceService(): ServiceService { if (!$this->_serviceService) { $this->_serviceService = new ServiceService($this->request); } return $this->_serviceService; } protected function getFormFieldOption(string $field, array $options = []): array { switch ($field) { case 'serviceinfo_uid': foreach ($this->getServiceService()->getEntities() as $entity) { $options[$entity->getPK()] = $entity->getTitle(); } break; case 'item_uid': //$item_type(CPU,RAM,STORAGE등)에 따라 선언된 getFormFieldOption사용 됨 $item_types = ['LINE', 'IP', 'SERVER', 'CPU', 'RAM', 'STORAGE', 'SOFTWARE', 'DEFENCE', 'DOMAIN']; foreach ($item_types as $item_type) { $options[$item_type] = []; foreach ($this->getService()->getEquipmentService($item_type)->getEntities() as $entity) { $options[$item_type][$entity->getPK()] = $entity->getTitle(); } } break; default: $options = parent::getFormFieldOption($field, $options); break; } return $options; } //Index,FieldForm관련 }