Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app routing.yml:
- TestBundle:
- resource: "@TestBundle/Controller/DefaultController.php"
- type: annotation
- bundle routing.yml is empty
- the controller:
- <?php
- namespace Acme\TestBundle\Controller;
- use Symfony\Bundle\FrameworkBundle\Controller\Controller;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
- /*
- * @Route("/tests")
- */
- class DefaultController extends Controller
- {
- /*
- * @Route("/index/{name}")
- */
- public function indexAction($name)
- {
- return $this->render('TestBundle:Default:index.html.twig', array('name' => $name));
- }
- public function homepageAction($name)
- {
- $autore = \Acme\TestBundle\Model\AuthorQuery::create()->findOne();
- return $this->render('TestBundle:Default:homepage.html.twig', array('name' => $name,'autore'=>$autore));
- }
- }
Add Comment
Please, Sign In to add comment