40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers\Admin;
|
|
|
|
use App\Controllers\AbstractWebController;
|
|
use CodeIgniter\HTTP\RequestInterface;
|
|
use CodeIgniter\HTTP\ResponseInterface;
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
class Home extends AbstractWebController
|
|
{
|
|
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(
|
|
'dashboard',
|
|
[
|
|
'layout' => 'admin',
|
|
'entity' => $entity
|
|
],
|
|
'traffic'
|
|
);
|
|
return $this->action_render_process(
|
|
__FUNCTION__,
|
|
[
|
|
'authContext' => $this->getAuthContext(),
|
|
'classPath' => service('trafficservice')->getClassPaths(false),
|
|
'layout' => 'admin',
|
|
'dashboards' => $dashboards
|
|
]
|
|
);
|
|
}
|
|
}
|