| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | public function load(array $configs, ContainerBuilder $container) |
||
| 22 | { |
||
| 23 | if (!$container->hasParameter('locale')) { |
||
| 24 | throw new UndefinedOptionsException('The locale parameter must be defined under parameters in your symfony configuration'); |
||
| 25 | } |
||
| 26 | |||
| 27 | $configuration = new Configuration(); |
||
| 28 | $this->processConfiguration($configuration, $configs); |
||
| 29 | |||
| 30 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
||
| 31 | $loader->load('services.yml'); |
||
| 32 | |||
| 33 | $menuBuilder = $container->getDefinition('alpixel_menu.builder'); |
||
| 34 | $menuBuilder->addMethodCall('setDefaultLocale', [$container->getParameter('locale')] ); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |