<?php

namespace {{ namespace }}\Controller;

{% block use_statements %}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
{% if 'annotation' == format -%}
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
{% endif %}
{% endblock use_statements %}

{% block class_definition %}
class DefaultController extends Controller
{% endblock class_definition %}
{
{% block class_body %}
    {% if 'annotation' == format -%}
    /**
     * @Route("/")
     * @Template()
     */
    {% endif -%}
    public function indexAction()
    {
        $request = $this->container->get('request');
        $bundleName = $request->attributes->get('_template')->get('bundle');

        {% if 'annotation' != format -%}
        return $this->render('{{ bundle }}:Default:index.html.twig', array('bundleName' => $bundleName));
        {%- else -%}
        return array('bundleName' => $bundleName);
        {%- endif %}

    }
{% endblock class_body %}
}

<?php

namespace {{ namespace }}\Controller;

{% block use_statements %}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
{% if 'annotation' == format -%}
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
{% endif %}
{% endblock use_statements %}

{% block class_definition %}
class DefaultController extends Controller
{% endblock class_definition %}
{
{% block class_body %}
    {% if 'annotation' == format -%}
    /**
     * @Route("/", "home")
     * @Template()
     */
    {% endif -%}
    public function indexAction()
    {
        $request = $this->container->get('request');
        $bundleName = $request->attributes->get('_template')->get('bundle');

        {% if 'annotation' != format -%}
        return $this->render('{{ bundle }}:Default:index.html.twig', array('bundleName' => $bundleName));
        {%- else -%}
        return array('bundleName' => $bundleName);
        {%- endif %}

    }
{% endblock class_body %}
}

Add name property to default controller skeleton
Add name property to default controller skeleton
