symfony - Twig template file not found in service -


rendering twig template inside controller works charm. have render template inside service, , won't work:

"unable find template file ..."

the service container-aware , has "container" injected.

i've tried different ways set template file:

$this->container->get('templating')      ->render('appbundle:email:mytemplate.html.twig'); $this->container->get('templating')      ->render('src/appbundle/resources/views/email/mytemplate.html.twig'); 

always same error... template file exists in /src/appbundle/resources/views/email/mytemplate.html.twig (double-checked!)

this controller call works:

$this->get('templating')      ->render('appbundle:email:mytemplate.html.twig'); 

why won't work in service...?  


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -