dbms/app/Controllers/Admin/Customer/ServiceHistoryController.php
2025-08-13 10:45:59 +09:00

54 lines
1.8 KiB
PHP

<?php
namespace App\Controllers\Admin\Customer;
use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Helpers\Customer\ServiceHistoryHelper;
use App\Services\Customer\ServiceHistoryService;
class ServiceHistoryController extends CustomerController
{
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->content_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(): ServiceHistoryService
{
if (!$this->_service) {
$this->_service = new ServiceHistoryService();
}
return $this->_service;
}
public function getHelper(): ServiceHistoryHelper
{
if (!$this->_helper) {
$this->_helper = new ServiceHistoryHelper();
}
return $this->_helper;
}
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
{
switch ($this->getAction()) {
case 'index':
$result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'popup');
break;
default:
$result = parent::getResultSuccess($message, $actionTemplate);
break;
}
return $result;
}
//Index,FieldForm관련
}