dbms/app/Controllers/Admin/Customer/ServiceController.php
2025-05-28 19:00:28 +09:00

56 lines
1.9 KiB
PHP

<?php
namespace App\Controllers\Admin\Customer;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Helpers\Customer\ServiceHelper;
use App\Services\Customer\ServiceService;
class ServiceController extends CustomerController
{
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->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;
}
public function getService(): ServiceService
{
if (!$this->_service) {
$this->_service = new ServiceService($this->request);
}
return $this->_service;
}
public function getHelper(): ServiceHelper
{
if (!$this->_helper) {
$this->_helper = new ServiceHelper($this->request);
}
// dd($this->_helper);
return $this->_helper;
}
//Index,FieldForm관련
// protected function create_process(): mixed
// {
// $entity = parent::create_process();
// //사용중인 서버로 변경
// $this->getServerService()->setOccupied($this->getServerService()->getEntity($entity->getServerInfoUID()));
// return $entity;
// }
protected function index_process(): array
{
$fields = [
'fields' => ['clientinfo_uid', 'item_type', 'billing_at', 'rack', 'LINE', 'SERVER', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'start_at', 'status'],
];
$this->init('index', $fields);
return parent::index_process();
}
}