62 lines
2.5 KiB
PHP
62 lines
2.5 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers\Front;
|
|
|
|
use CodeIgniter\HTTP\RequestInterface;
|
|
use CodeIgniter\HTTP\ResponseInterface;
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
class PageController extends FrontController
|
|
{
|
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
|
{
|
|
parent::initController($request, $response, $logger);
|
|
if ($this->service === null) {
|
|
$this->service = service('pageservice');
|
|
}
|
|
}
|
|
protected function action_init_process(string $action, array $formDatas = []): void
|
|
{
|
|
parent::action_init_process($action, $formDatas);
|
|
$this->addViewDatas('layout', $this->layouts);
|
|
$this->addViewDatas('helper', $this->service->getHelper());
|
|
$this->service->getActionForm()->action_init_process($action, $formDatas);
|
|
$this->addViewDatas('formFields', $this->service->getActionForm()->getFormFields());
|
|
$this->addViewDatas('formRules', $this->service->getActionForm()->getFormRules());
|
|
$this->addViewDatas('formFilters', $this->service->getActionForm()->getFormFilters());
|
|
$this->addViewDatas('formOptions', $this->service->getActionForm()->getFormOptions());
|
|
}
|
|
|
|
//Index,FieldForm관련
|
|
public function index(): string
|
|
{
|
|
$action = __FUNCTION__;
|
|
$this->action_init_process($action);
|
|
return $this->action_render_process('welcome', $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? "page");
|
|
}
|
|
public function about_us(): string
|
|
{
|
|
$action = __FUNCTION__;
|
|
$this->action_init_process($action);
|
|
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? "page");
|
|
}
|
|
public function products(): string
|
|
{
|
|
$action = __FUNCTION__;
|
|
$this->action_init_process($action);
|
|
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? "page");
|
|
}
|
|
public function logistics_services(): string
|
|
{
|
|
$action = __FUNCTION__;
|
|
$this->action_init_process($action);
|
|
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? "page");
|
|
}
|
|
public function contact(): string
|
|
{
|
|
$action = __FUNCTION__;
|
|
$this->action_init_process($action);
|
|
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? "page");
|
|
}
|
|
}
|