diff --git a/app/Cells/ProductCell.php b/app/Cells/ProductCell.php index ddfcb56..b93e897 100644 --- a/app/Cells/ProductCell.php +++ b/app/Cells/ProductCell.php @@ -13,18 +13,10 @@ class ProductCell extends BaseCell return $this->_deviceModel = $this->_deviceModel ?: new DeviceModel(); } - public function virtual(array $cellDatas = []) - { - return view( - 'Views/cells/product/' . __FUNCTION__, - ['cellDatas' => $cellDatas] - ); - } - - public function beremetal(array $cellDatas = []) + public function device(array $cellDatas = []) { $cellDatas['device'] = []; - $cellDatas['device']['categorys'] = ['server', 'memory', 'disk']; + $cellDatas['device']['categorys'] = ['server', 'cpu', 'memory', 'disk', 'nic', 'publicip', 'os']; $cellDatas['device']['options'] = $this->getDeviceModel()->getOptions(); return view( 'Views/cells/product/' . __FUNCTION__, @@ -32,7 +24,7 @@ class ProductCell extends BaseCell ); } - public function beremetal_calulator(array $cellDatas = []): string + public function device_calulator(array $cellDatas = []): string { $cellDatas['device'] = []; $cellDatas['device']['categorys'] = ['server', 'cpu', 'memory', 'disk', 'nic', 'publicip', 'os']; diff --git a/app/Controllers/Admin/BillingController.php b/app/Controllers/Admin/BillingController.php index 9f733f9..0d7c71e 100644 --- a/app/Controllers/Admin/BillingController.php +++ b/app/Controllers/Admin/BillingController.php @@ -17,14 +17,13 @@ class BillingController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->_model = new BillingModel(); + $this->initModel(new BillingModel()); $this->_viewDatas['className'] = 'Billing'; $this->_viewPath .= strtolower($this->_viewDatas['className']); $this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title'); $this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])]; helper($this->_viewDatas['className']); } - final protected function getOrderModel(): OrderModel { return $this->_orderModel = $this->_orderModel ?: new OrderModel(); @@ -78,7 +77,7 @@ class BillingController extends AdminController } //View 관련 - protected function view_process($entity) + protected function view_process($entity): BillingEntity { $entity = parent::view_process($entity); //청구서 연결 주문정보 가져오기 diff --git a/app/Controllers/Admin/BoardController.php b/app/Controllers/Admin/BoardController.php index 758bccf..5c97570 100644 --- a/app/Controllers/Admin/BoardController.php +++ b/app/Controllers/Admin/BoardController.php @@ -3,6 +3,7 @@ namespace App\Controllers\Admin; use App\Controllers\Trait\UpDownloadTrait; +use App\Entities\BoardEntity; use App\Models\BoardModel; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; @@ -15,7 +16,7 @@ class BoardController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->_model = new BoardModel(); + $this->initModel(new BoardModel()); $this->_viewDatas['className'] = 'Board'; $this->_viewPath .= strtolower($this->_viewDatas['className']);; $this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title'); @@ -66,7 +67,7 @@ class BoardController extends AdminController private function build_notice() { - $entitys = $this->_model->getEntitys(['category' => $this->_category_notice, 'status' => DEFAULTS['STATUS']]); + $entitys = $this->getModel()->getEntitys(['category' => $this->_category_notice, 'status' => DEFAULTS['STATUS']]); $temps = array("