Add brand new legacy theme helpers

This commit is contained in:
Michael Weimann 2021-07-24 20:25:13 +02:00
parent a0d216c61d
commit 2509bd4a98
No known key found for this signature in database
GPG Key ID: 34F0524D4DA694A1
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use Engelsystem\Renderer\Twig\Extensions\Globals;
/**
* @return int
*/
function theme_id(): int
{
/** @var Globals $globals */
$globals = app(Globals::class);
$globals = $globals->getGlobals();
return $globals['themeId'];
}
/**
* @return array
*/
function theme(): array
{
$theme_id = theme_id();
return config('themes')[$theme_id];
}
/**
* @return string
*/
function theme_type(): string
{
return theme()['type'];
}

View File

@ -57,6 +57,7 @@ $includeFiles = [
__DIR__ . '/../includes/controller/user_worklog_controller.php', __DIR__ . '/../includes/controller/user_worklog_controller.php',
__DIR__ . '/../includes/helper/graph_helper.php', __DIR__ . '/../includes/helper/graph_helper.php',
__DIR__ . '/../includes/helper/legacy_helper.php',
__DIR__ . '/../includes/helper/message_helper.php', __DIR__ . '/../includes/helper/message_helper.php',
__DIR__ . '/../includes/helper/email_helper.php', __DIR__ . '/../includes/helper/email_helper.php',