grav-theme-personal/personal.php

26 lines
500 B
PHP
Raw Normal View History

2020-06-17 14:42:09 +02:00
<?php namespace Grav\Theme;
use Grav\Common\Theme;
class Personal extends Theme
{
public static function getSubscribedEvents()
{
return [
'onThemeInitialized' => ['onThemeInitialized', 0]
];
}
public function onThemeInitialized()
{
$this->enable([
'onTwigSiteVariables' => ['onTwigSiteVariables', 0]
]);
}
public function onTwigSiteVariables()
{
$this->grav['twig']->twig_vars['theme_config'] = $this->grav['config']->get('themes.personal');
}
}