getDefinition('twig'); $theme = $container->getDefinition(ThemeConfiguration::class); $twig->addMethodCall('addGlobal', ['kimai_context', $theme]); if ($container->hasDefinition('twig.loader.native_filesystem')) { $definition = $container->getDefinition('twig.loader.native_filesystem'); $path = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR; foreach ($container->getParameter('kimai.invoice.documents') as $invoicePath) { if (!is_dir($path . $invoicePath)) { continue; } $definition->addMethodCall('addPath', [$path . $invoicePath, 'invoice']); } } } }