php - Symfony2 Why template rendered like string? -
i use service menu render , other menu features. when render menu, instead html menu receive menu string. why happens? i have service. services: ad_backend.menu: class: adbackendbundle\services\menuservice arguments: [@doctrine.orm.entity_manager, @twig] namespace adbackendbundle\services; use doctrine\orm\entitymanager; class menuservice { private $em; private $twig; public function __construct(entitymanager $em, \twig_environment $twig) { $this->em = $em; $this->twig = $twig; } public function getmenulist() { return $this->em->getrepository('adbackendbundle:admenu')->findall(); } public function rendermenubyid($id) { $links = $this->em->getrepository('adbackendbundle:admenu')->getlinksbymenuid($id); return $this->twig->render('adbackendbundle:menu:menu-template.html.twig', array( 'links' => ...