123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /*
- * This file is part of the Sonata project.
- *
- * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Sonata\UserBundle\DependencyInjection;
- use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
- use Symfony\Component\Config\Resource\FileResource;
- use Symfony\Component\DependencyInjection\ContainerBuilder;
- use Symfony\Component\DependencyInjection\Reference;
- use Symfony\Component\DependencyInjection\Definition;
- use Symfony\Component\HttpKernel\DependencyInjection\Extension;
- use Symfony\Component\Config\FileLocator;
- /**
- *
- * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
- */
- class SonataUserExtension extends Extension
- {
- /**
- *
- * @param array $config An array of configuration settings
- * @param ContainerBuilder $container A ContainerBuilder instance
- */
- public function load(array $config, ContainerBuilder $container)
- {
- $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
- $loader->load('admin_orm.xml');
- $loader->load('form.xml');
- }
- /**
- * Returns the base path for the XSD files.
- *
- * @return string The XSD base path
- */
- public function getXsdValidationBasePath()
- {
- return __DIR__.'/../Resources/config/schema';
- }
- public function getNamespace()
- {
- return 'http://www.sonata-project.org/schema/dic/page';
- }
- public function getAlias()
- {
- return "sonata_user";
- }
- }
|