_serverService) { $this->_serverService = new ServerService($this->request); } return $this->_serverService; } abstract public function getPartService(): mixed; protected function setOrderByForList() { //OrderBy 처리 $this->getService()->getModel()->orderBy('serverinfo_uid', 'ASC', false); parent::setOrderByForList(); } protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string { switch ($action) { case 'index': $this->getHelper()->setViewDatas($this->getViewDatas()); $result = view($this->view_path . 'popup' . DIRECTORY_SEPARATOR . $action, ['viewDatas' => $this->getViewDatas()]); break; default: $result = parent::getResultPageByActon($action, $message); break; } return $result; } protected function getFormFieldOption(string $field, array $options): array { switch ($field) { case 'serverinfo_uid': $temps = []; foreach ($this->getServerService()->getEntities() as $entity) { $temps[$entity->getPK()] = $entity->getTitle(); } $options[$field] = $temps; // dd($options); break; case 'cpuinfo_uid': case 'raminfo_uid': case 'diskinfo_uid': $temps = []; foreach ($this->getPartService()->getEntities() as $entity) { $temps[$entity->getPK()] = $entity->getTitle(); } $options[$field] = $temps; // dd($options); break; default: $options = parent::getFormFieldOption($field, $options); break; } return $options; } }