38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers\Admin;
|
|
|
|
use App\Controllers\CommonController;
|
|
use CodeIgniter\HTTP\RequestInterface;
|
|
use CodeIgniter\HTTP\ResponseInterface;
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
class Home extends AdminController
|
|
{
|
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
|
{
|
|
parent::initController($request, $response, $logger);
|
|
}
|
|
//Index,FieldForm관련
|
|
public function welcome(): string
|
|
{
|
|
$dashboards = [];
|
|
foreach (service('trafficservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity)
|
|
$dashboards[] = $this->action_render_process(
|
|
['admin', 'traffic'],
|
|
'dashboard',
|
|
['entity' => $entity]
|
|
);
|
|
return $this->action_render_process(
|
|
$this->getActionPaths(),
|
|
self::PATH . DIRECTORY_SEPARATOR . __FUNCTION__,
|
|
[
|
|
'authContext' => $this->getAuthContext(),
|
|
'classPath' => service('trafficservice')->getClassPaths(false),
|
|
'layout' => $this->getLayout(),
|
|
'dashboards' => $dashboards
|
|
]
|
|
);
|
|
}
|
|
}
|