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
|
class TwigBBExtension extends \Twig_Extension
|
||||||
{
|
{
|
||||||
private $assets;
|
private $container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @DI\InjectParams({
|
* @DI\InjectParams({
|
||||||
@ -21,7 +21,7 @@ class TwigBBExtension extends \Twig_Extension
|
|||||||
*/
|
*/
|
||||||
public function __construct(ContainerInterface $container)
|
public function __construct(ContainerInterface $container)
|
||||||
{
|
{
|
||||||
$this->assets = $container->get('templating.helper.assets');
|
$this->container = $container;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilters()
|
public function getFilters()
|
||||||
@ -78,7 +78,8 @@ class TwigBBExtension extends \Twig_Extension
|
|||||||
$sentence,
|
$sentence,
|
||||||
'<img src="'
|
'<img src="'
|
||||||
. $this
|
. $this
|
||||||
->assets
|
->container
|
||||||
|
->get('templating.helper.assets')
|
||||||
->getUrl(
|
->getUrl(
|
||||||
'upload/images/'
|
'upload/images/'
|
||||||
. (($ns == '') ? '' : $ns . '/')
|
. (($ns == '') ? '' : $ns . '/')
|
||||||
|
Loading…
Reference in New Issue
Block a user