Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactor services configurations

  • Loading branch information...
commit bb3fd853b955f711a30be03221ddfaa51a28703c 1 parent 18c8f0b
Konstantin Kudryashov everzet authored
5 DependencyInjection/Configuration.php
View
@@ -27,11 +27,12 @@ public function getConfigTreeBuilder()
->addDefaultsIfNotSet()
->children()
->booleanNode('view')->defaultTrue()->end()
- ->booleanNode('resolver')->defaultTrue()->end()
+ ->booleanNode('resource_resolver')->defaultTrue()->end()
+ ->booleanNode('orm_user')->defaultTrue()->end()
->end()
->end()
->booleanNode('routing_loader')->defaultTrue()->end()
- ->booleanNode('form')->defaultTrue()->end()
+ ->booleanNode('form_manager')->defaultTrue()->end()
->booleanNode('datatable')->defaultTrue()->end()
->end()
;
17 DependencyInjection/KnpRadExtension.php
View
@@ -25,26 +25,29 @@ public function load(array $configs, ContainerBuilder $container)
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
if ($config['mailer_logger']) {
- $loader->load('mailer.logger.xml');
+ $loader->load('mailer_logger.xml');
}
+
if ($config['listener']['view']) {
$loader->load('view_listener.xml');
}
-
- if ($config['listener']['resolver']) {
- $loader->load('resource_resolver.xml');
+ if ($config['listener']['resource_resolver']) {
+ $loader->load('resource_resolver_listener.xml');
+ }
+ if ($config['listener']['orm_user']) {
+ $loader->load('orm_user_listener.xml');
}
if ($config['routing_loader']) {
$loader->load('routing_loader.xml');
}
- if ($config['form']) {
- $loader->load('form.xml');
+ if ($config['form_manager']) {
+ $loader->load('form_manager.xml');
}
if ($config['datatable']) {
$loader->load('datatable.xml');
}
}
-}
+}
0  Resources/config/form.xml → Resources/config/form_manager.xml
View
File renamed without changes
0  Resources/config/mailer.logger.xml → Resources/config/mailer_logger.xml
View
File renamed without changes
20 Resources/config/orm_user_listener.xml
View
@@ -0,0 +1,20 @@
+<?xml version="1.0" ?>
+
+<container xmlns="http://symfony.com/schema/dic/services"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
+
+ <parameters>
+ <parameter key="knp_rad.orm.user_listener.class">Knp\RadBundle\Doctrine\Listener\PasswordHashListener</parameter>
+ </parameters>
+
+ <services>
+
+ <service id="knp_rad.orm.user_listener" class="%knp_rad.orm.user_listener.class%" public="false">
+ <argument type="service" id="security.encoder_factory" />
+ <tag name="doctrine.event_subscriber" />
+ </service>
+
+ </services>
+
+</container>
0  Resources/config/resource_resolver.xml → Resources/config/resource_resolver_listener.xml
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.