_serverService) { $this->_serverService = new ServerService(); } return $this->_serverService; } public function parttable(array $params): string { $this->getService()->setAction(__FUNCTION__); $this->getService()->setFormFields(); $this->getService()->setFormFilters(); $this->getService()->setFormRules(); $this->getService()->setFormOptions(); $entities = []; $serverEntity = null; if (array_key_exists('serverinfo_uid', $params)) { //서버정보 $serverEntity = $this->getServerService()->getEntity($params['serverinfo_uid']); if ($serverEntity instanceof ServerEntity) { //서버파트정보 $serverPartEntities = $this->getService()->getEntities(['serverinfo_uid' => $serverEntity->getPK(),]); foreach ($serverPartEntities as $entity) { if (!array_key_exists($entity->getType(), $entities)) { $entities[$entity->getType()] = []; } $entities[$entity->getType()][] = $entity; } } } $template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__; return view('cells/serverpart/' . $template, [ 'serverPartCellDatas' => [ 'control' => $this->getService()->getControlDatas(), 'service' => $this->getService(), 'serverinfo_uid' => $params['serverinfo_uid'], 'entities' => $entities, 'serverEntity' => $serverEntity, 'types' => $params['types'], ], ]); } }