2020-07-10 12:20:25 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-08-23 11:05:16 +00:00
|
|
|
namespace Modules\Admin\Controllers;
|
2020-07-10 12:20:25 +00:00
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
use CodeIgniter\Controller;
|
|
|
|
use CodeIgniter\HTTP\RequestInterface;
|
|
|
|
use CodeIgniter\HTTP\ResponseInterface;
|
|
|
|
use Psr\Log\LoggerInterface;
|
2021-09-02 16:34:25 +00:00
|
|
|
use ViewThemes\Theme;
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2020-07-10 12:20:25 +00:00
|
|
|
/**
|
|
|
|
* Class BaseController
|
|
|
|
*
|
2021-05-19 16:35:13 +00:00
|
|
|
* BaseController provides a convenient place for loading components and performing functions that are needed by all
|
|
|
|
* your controllers. Extend this class in any new controllers: class Home extends BaseController
|
2020-07-10 12:20:25 +00:00
|
|
|
*
|
|
|
|
* For security be sure to declare any new methods as protected or private.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class BaseController extends Controller
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Constructor.
|
|
|
|
*/
|
|
|
|
public function initController(
|
2021-04-02 17:20:02 +00:00
|
|
|
RequestInterface $request,
|
|
|
|
ResponseInterface $response,
|
|
|
|
LoggerInterface $logger
|
2021-05-06 14:00:48 +00:00
|
|
|
): void {
|
2021-09-02 16:34:25 +00:00
|
|
|
$this->helpers = array_merge($this->helpers, ['auth', 'breadcrumb', 'svg', 'components', 'misc']);
|
|
|
|
|
2020-07-10 12:20:25 +00:00
|
|
|
// Do Not Edit This Line
|
|
|
|
parent::initController($request, $response, $logger);
|
2021-09-02 16:34:25 +00:00
|
|
|
|
|
|
|
Theme::setTheme('admin');
|
2020-07-10 12:20:25 +00:00
|
|
|
}
|
|
|
|
}
|