is there a way to render a template in a bundle? I tryed this:
- Code: Select all
<?php
namespace Aranox\ContactBundle;
use Aranox\CoreBundle\WidgetInterface;
use \Symfony\Component\HttpKernel\Bundle\Bundle;
class AranoxContactBundle extends Bundle implements WidgetInterface
{
protected $container;
public function __constructor($container)
{
$this->container = $container;
}
public function render()
{
return $this->container->render("AranoxContactBundle:Widget:content.html.twig");
}
}
Edit: Sorry forgot most important: container is always null, the question is, how to get the render method.
Edit2: Ok, I found help at irc. Thanks
