Skip to content

Instantly share code, notes, and snippets.

@Geraint
Last active August 29, 2015 14:25
Show Gist options
  • Save Geraint/813790a6d6562f8d3d60 to your computer and use it in GitHub Desktop.
Save Geraint/813790a6d6562f8d3d60 to your computer and use it in GitHub Desktop.
Eclipse Template for Symfony2 Controller
namespace ${bundle}Bundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ${controller}Controller extends Controller
{
/**
* @Route("${route}")
*/
public function indexAction()
{
return $$this->render('${controller}/index.html.twig', array(
${cursor}
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment