-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathxrowMatrixExtension.php
More file actions
44 lines (38 loc) · 1.53 KB
/
xrowMatrixExtension.php
File metadata and controls
44 lines (38 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* This file is part of the EzMatrixBundle package
*
* See README.md file distributed with this source code for further information.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @author For list of contributors see link in composer.json file distributed with this source code.
*/
namespace xrow\MatrixBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\Yaml\Yaml;
/**
* This is the class that loads and manages your bundle configuration
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
*/
class xrowMatrixExtension extends Extension implements PrependExtensionInterface
{
/**
* {@inheritDoc}
*/
public function load( array $configs, ContainerBuilder $container )
{
$loader = new Loader\YamlFileLoader( $container, new FileLocator( __DIR__ . '/../Resources/config' ) );
$loader->load( 'services.yml' );
}
public function prepend( ContainerBuilder $container )
{
$config = Yaml::parse( __DIR__ . '/../Resources/config/field_templates.yml' );
$container->prependExtensionConfig( 'ezpublish', $config );
}
}