This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooController | |
{ | |
public function viewArticleAction($articleId) | |
{ | |
$article = $this->articleRepository->getById($articleId); | |
$parameters = array( | |
'article' => $article, | |
); | |
// beginner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imports: | |
- file:config.yml | |
- file:somestuff.yml | |
services: | |
foo.controller: | |
class: Application\FooBundle\Controller\FooController | |
arguments: | |
- @router | |
- @request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// format: html, POST /register, dev calls setRedirectRoute('welcome') | |
302 => /welcome, browser redirects, gets a new page | |
// format: json, POST /register, dev calls setRedirectRoute('welcome') | |
302 => /welcome, browser redirects, /welcome returns a 200 with {"some json shit"}, ajax callback gets json | |
// format: html, GET|POST /anypage, dev calls setRedirectUri('http://google.com/FUUUUU') |
NewerOlder