*/ class TwigExtraExtension extends Extension { /** @return void */ public function load(array $configs, ContainerBuilder $container) { $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); if ($container->getParameter('kernel.debug')) { $loader->load('suggestor.php'); } foreach (array_keys(Extensions::getClasses()) as $extension) { if ($this->isConfigEnabled($container, $config[$extension])) { $loader->load($extension.'.php'); if ('markdown' === $extension && class_exists(CommonMarkConverter::class)) { $loader->load('markdown_league.php'); } } } } }