Fixed scope error in TwigBBExtension

Signed-off-by: Gergely POLONKAI <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely POLONKAI 2012-08-16 19:37:26 +02:00
parent 08e987c4bb
commit 44539862a2
1 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@ use JMS\DiExtraBundle\Annotation as DI;
*/
class TwigBBExtension extends \Twig_Extension
{
private $assets;
private $container;
/**
* @DI\InjectParams({
@ -21,7 +21,7 @@ class TwigBBExtension extends \Twig_Extension
*/
public function __construct(ContainerInterface $container)
{
$this->assets = $container->get('templating.helper.assets');
$this->container = $container;
}
public function getFilters()
@ -78,7 +78,8 @@ class TwigBBExtension extends \Twig_Extension
$sentence,
'<img src="'
. $this
->assets
->container
->get('templating.helper.assets')
->getUrl(
'upload/images/'
. (($ns == '') ? '' : $ns . '/')