Permalink
Browse files

Fixed JQueryExtension class due to changes in Symfony 2.1

  • Loading branch information...
1 parent 3304dde commit 9d9d3c0b850521f486c54e49f87438ca1c153ca8 @mgiagnoni committed Jun 27, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 Resources/config/twig.xml
  2. +2 −2 Twig/Extension/JQueryExtension.php
@@ -9,7 +9,7 @@
<services>
<service id="twig.extension.lyra.jquery" class="%twig.extension.lyra.jquery.class%">
<tag name="twig.extension" />
- <argument type="service" id="session" />
+ <argument type="service" id="service_container" />
<argument type="collection" />
</service>
</services>
@@ -17,9 +17,9 @@ class JQueryExtension extends \Twig_Extension
private $options;
- public function __construct($session, $options = array())
+ public function __construct($container, $options = array())
{
- $this->locale = $session->getLocale();
+ $this->locale = $container->isScopeActive('request') ? $container->get('request')->getLocale() : 'en_US';
$this->options = $options;
}

0 comments on commit 9d9d3c0

Please sign in to comment.