getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../config')); $loader->load('services/config.yaml'); $loader->load('services/form.yaml'); $loader->load('services/security.yaml'); $loader->load('services/controller.yaml'); $loader->load('services/templating.yaml'); $loader->load('services/menu.yaml'); $loader->load('services/calculator.yaml'); $loader->load('services/services.yaml'); $this->storeConfig('resources', $config, $container); $this->storeConfig('charges', $config, $container); } public function prepend(ContainerBuilder $container) { $this->prependAuthorization($container); $this->prependRoutes($container); } /** (non-PHPdoc). * @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend() */ public function prependRoutes(ContainerBuilder $container) { //add routes for custom bundle $container->prependExtensionConfig('chill_main', [ 'routing' => [ 'resources' => [ '@ChillBudgetBundle/config/routing.yaml', ], ], ]); } protected function prependAuthorization(ContainerBuilder $container) { $container->prependExtensionConfig('security', [ 'role_hierarchy' => [ BudgetElementVoter::UPDATE => [BudgetElementVoter::SEE], BudgetElementVoter::CREATE => [BudgetElementVoter::SEE], ], ]); } protected function storeConfig($position, array $config, ContainerBuilder $container) { $container ->setParameter(sprintf('chill_budget.%s', $position), $config[$position]); } }