igmf/kernel/AdminController.php

26 lines
743 B
PHP
Raw Normal View History

2024-09-03 16:29:44 +03:00
<?php
namespace kernel;
use kernel\Controller;
2024-09-11 17:38:46 +03:00
use kernel\helpers\Debug;
2024-09-03 16:29:44 +03:00
use kernel\services\AdminThemeService;
2025-01-15 16:57:03 +03:00
use kernel\services\ThemeService;
2024-09-03 16:29:44 +03:00
class AdminController extends Controller
{
protected AdminThemeService $adminThemeService;
2025-01-15 16:57:03 +03:00
protected ThemeService $themeService;
2024-09-03 16:29:44 +03:00
2024-09-12 16:01:04 +03:00
protected function init(): void
2024-09-03 16:29:44 +03:00
{
$this->adminThemeService = new AdminThemeService();
2025-01-15 16:57:03 +03:00
$this->themeService = new ThemeService();
2024-09-03 16:29:44 +03:00
$active_theme = $this->adminThemeService->getActiveAdminThemeInfo();
$this->cgView->layoutPath = getConst($active_theme['layout_path']);
$this->cgView->layout = "/" . $active_theme['layout'];
$this->cgView->addVarToLayout("resources", $active_theme['resource']);
}
}