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; $this->partinfo_cnt_range = array_combine(range(0, 10), range(0, 10)); $this->partinfo_extra_options = array_merge(["" => "RAID 선택"], lang("{$this->getService()->getClassName()}.EXTRAS")); } public function getService(): ServerService { if (!$this->_service) { $this->_service = new ServerService(); } return $this->_service; } public function getHelper(): ServerHelper { if (!$this->_helper) { $this->_helper = new ServerHelper(); } return $this->_helper; } //Index,FieldForm관련 protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { case 'index': case 'view': $result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'server'); break; default: $result = parent::getResultSuccess($message, $actionTemplate); break; } return $result; } //생성 protected function create_form_process(): void { $format = env("Server.Prefix.code.format", false); if (!$format) { throw new \Exception(__METHOD__ . "에서 code의 format이 정의되지 않았습니다."); } $default = (int)env("Server.Default.code", 0); $this->setFormDatasDefault('code', $this->getService()->getLastestCode($format, $default)); parent::create_form_process(); } }