igmf/kernel/themes/default/controllers/MainController.php

28 lines
672 B
PHP
Raw Normal View History

2025-01-15 16:57:03 +03:00
<?php
namespace kernel\themes\default\controllers;
use kernel\Controller;
class MainController extends Controller
{
protected function init(): void
{
parent::init();
2025-01-16 16:14:43 +03:00
$this->cgView->viewPath = KERNEL_DIR . "/themes/default/views/main/";
2025-01-15 16:57:03 +03:00
$this->cgView->layout = "main.php";
2025-01-16 16:14:43 +03:00
$this->cgView->layoutPath = KERNEL_DIR . "/themes/default/views/layout/";
$this->cgView->addVarToLayout("resources", "/resources/themes/default");
2025-01-15 16:57:03 +03:00
}
public function actionIndex(): void
{
$this->cgView->render("index.php");
}
2025-01-16 16:14:43 +03:00
public function actionAbout(): void
{
$this->cgView->render("about.php");
}
2025-01-15 16:57:03 +03:00
}