PHP Class AppBundle\Controller\Admin\BlogController

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

Public Methods

Method Description
deleteAction ( Request $request, Post $post ) Deletes a Post entity.
editAction ( Post $post, Request $request ) Displays a form to edit an existing Post entity.
indexAction ( ) Lists all Post entities.
newAction ( Request $request ) Creates a new Post entity.
showAction ( Post $post ) Finds and displays a Post entity.

Private Methods

Method Description
createDeleteForm ( Post $post ) : Form Creates a form to delete a Post entity by id.

Method Details

deleteAction() public method

Deletes a Post entity.
public deleteAction ( Request $request, Post $post )
$request Symfony\Component\HttpFoundation\Request
$post AppBundle\Entity\Post

editAction() public method

Displays a form to edit an existing Post entity.
public editAction ( Post $post, Request $request )
$post AppBundle\Entity\Post
$request Symfony\Component\HttpFoundation\Request

indexAction() public method

This controller responds to two different routes with the same URL: * 'admin_post_index' is the route with a name that follows the same structure as the rest of the controllers of this class. * 'admin_index' is a nice shortcut to the backend homepage. This allows to create simpler links in the templates. Moreover, in the future we could move this annotation to any other controller while maintaining the route name and therefore, without breaking any existing link.
public indexAction ( )

newAction() public method

Creates a new Post entity.
public newAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

showAction() public method

Finds and displays a Post entity.
public showAction ( Post $post )
$post AppBundle\Entity\Post