gist/src/Gist/Controller/HomeController.php
2015-05-05 22:06:02 +02:00

28 lines
590 B
PHP

<?php
namespace Gist\Controller;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Gist\Form\CreateGistForm;
/**
* Class HomeController
* @author Simon Vieille <simon@deblan.fr>
*/
class HomeController
{
public function indexAction(Request $request, Application $app)
{
$form = new CreateGistForm($app['form.factory'], $app['translator']);
$form = $form->build();
return $app['twig']->render(
'Home/index.html.twig',
array(
'form' => $form->createView(),
)
);
}
}