[go: nahoru, domu]

Skip to content

Commit

Permalink
Added option to disable locale listener
Browse files Browse the repository at this point in the history
  • Loading branch information
romaricdrigon committed Apr 9, 2014
1 parent ec56540 commit c0c6385
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function getConfigTreeBuilder()
->booleanNode('translation_fallback')->defaultFalse()->end()
->booleanNode('persist_default_translation')->defaultFalse()->end()
->booleanNode('skip_translation_on_load')->defaultFalse()->end()
->booleanNode('disable_locale_listener')->defaultFalse()->end()
->end()
;

Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/StofDoctrineExtensionsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function load(array $configs, ContainerBuilder $container)
$this->documentManagers[$name] = $listeners;
}

if ($useTranslatable) {
if ($useTranslatable && ! $config['disable_locale_listener']) {
$container->getDefinition('stof_doctrine_extensions.event_listener.locale')
->setPublic(true)
->addTag('kernel.event_subscriber');
Expand Down

0 comments on commit c0c6385

Please sign in to comment.