PHP Class AppBundle\Controller\BlogController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Show file Open project: alfonsomga/symfony.demo.on.roids Class Usage Examples

Public Methods

Method Description
commentFormAction ( Post $post ) : Response This controller is called directly via the render() function in the blog/post_show.html.twig template. That's why it's not needed to define a route name for it.
commentNewAction ( Request $request, Post $post )
indexAction ( $page )
postShowAction ( Post $post )

Method Details

commentFormAction() public method

The "id" of the Post is passed in and then turned into a Post object automatically by the ParamConverter.
public commentFormAction ( Post $post ) : Response
$post AppBundle\Entity\Post
return Symfony\Component\HttpFoundation\Response

commentNewAction() public method

public commentNewAction ( Request $request, Post $post )
$request Symfony\Component\HttpFoundation\Request
$post AppBundle\Entity\Post

indexAction() public method

public indexAction ( $page )

postShowAction() public method

public postShowAction ( Post $post )
$post AppBundle\Entity\Post