Fixed scope error in TwigBBExtension
Signed-off-by: Gergely POLONKAI <polesz@w00d5t0ck.info>
This commit is contained in:
parent
08e987c4bb
commit
44539862a2
@ -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 . '/')
|
||||
|
Loading…
Reference in New Issue
Block a user