uri_path .= strtolower($this->getService()->getClassName()) . '/'; // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; $this->class_path = $this->getService()->getClassPath(); $this->title = lang("{$this->getService()->getClassPath()}.title"); $this->helper = $this->getHelper(); // $this->individualStylesheets = ['server_partinfo.css']; // $this->individualScripts = ['server_partinfo.js']; } public function getService(): ServerService { if (!$this->_service) { $this->_service = new ServerService($this->request); } return $this->_service; } public function getHelper(): mixed { if (!$this->_helper) { $this->_helper = new ServerHelper($this->request); } return $this->_helper; } final public function getCpuService(): CpuService { if (!$this->_cpuService) { $this->_cpuService = new CpuService($this->request); } return $this->_cpuService; } final public function getRamService(): RamService { if (!$this->_ramService) { $this->_ramService = new RamService($this->request); } return $this->_ramService; } final public function getDiskService(): DiskService { if (!$this->_diskService) { $this->_diskService = new DiskService($this->request); } return $this->_diskService; } //Index,FieldForm관련 protected function index_process(): array { $fields = [ 'fields' => ['code', 'type', 'model', 'CPU', 'RAM', 'DISK', 'status'], ]; $this->init('index', $fields); $this->modal_type = 'modal_iframe'; $entities = []; foreach (parent::index_process() as $entity) { $entity->setPartEntities("CPU", $this->getCpuService()->getPartEntities($entity)); $entity->setPartEntities("RAM", $this->getRamService()->getPartEntities($entity)); $entity->setPartEntities("DISK", $this->getDiskService()->getPartEntities($entity)); $entities[] = $entity; } return $entities; } }