PHP Class AppBundle\Controller\Admin\BlogController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Afficher le fichier Open project: alfonsomga/symfony.demo.on.roids

Méthodes publiques

Méthode 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

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

Method Details

deleteAction() public méthode

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

editAction() public méthode

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 méthode

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 méthode

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

showAction() public méthode

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