dynamic branding options (#1205)

This commit is contained in:
Kevin Papst
2019-10-30 14:22:34 +01:00
committed by GitHub
parent 48aefb1862
commit f4fcfeba9d
11 changed files with 135 additions and 7 deletions

View File

@@ -9,6 +9,7 @@
namespace App\DependencyInjection\Compiler;
use App\Configuration\ThemeConfiguration;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -24,8 +25,8 @@ class TwigContextCompilerPass implements CompilerPassInterface
public function process(ContainerBuilder $container)
{
$twig = $container->getDefinition('twig');
$theme = $container->getParameter('kimai.theme');
$theme = $container->getDefinition(ThemeConfiguration::class);
$twig->addMethodCall('addGlobal', ['kimai_context', $theme]);
if ($container->hasDefinition('twig.loader.native_filesystem')) {