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 initAction(string $action): void { //$item_type(CPU,RAM,STORAGE등)에 따라 선언된 getFormFieldOption용 사용됨 (initAction보다 먼저 호출해야 됨) $this->initServiceItemOptions(); parent::initAction($action); } 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': $options = []; break; default: $options = parent::getFormFieldOption($field, $options); break; } return $options; } //Index,FieldForm관련 }