PHP Class Acme\DemoBundle\Controller\TodoController

Author: Gordon Franke ([email protected])
Inheritance: extends FOS\RestBundle\Controller\FOSRestController
显示文件 Open project: bayne/symfony-angular-todomvc

Public Methods

Method Description
deleteTodosAction ( integer $id ) : Response Removes a todo.
editTodosAction ( integer $id ) : Response Presents the form to use to update an existing todo.
getTodoAction ( integer $id ) : Response Get a single todo.
getTodosAction ( ) List all todos.
newTodoAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new todo.
postTodosAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\RouteRedirectView Creates a new todo from the submitted data.
putTodosAction ( Request $request, integer $id ) : Response Update existing todo from the submitted data or create a new todo at a specific location.
removeTodosAction ( integer $id ) : Response Removes a todo.

Method Details

deleteTodosAction() public method

Removes a todo.
public deleteTodosAction ( integer $id ) : Response
$id integer the todo id
return Symfony\Component\HttpFoundation\Response

editTodosAction() public method

Presents the form to use to update an existing todo.
public editTodosAction ( integer $id ) : Response
$id integer the todo id
return Symfony\Component\HttpFoundation\Response

getTodoAction() public method

Get a single todo.
public getTodoAction ( integer $id ) : Response
$id integer the todo id
return Symfony\Component\HttpFoundation\Response

getTodosAction() public method

List all todos.
public getTodosAction ( )

newTodoAction() public method

Presents the form to use to create a new todo.
public newTodoAction ( ) : Symfony\Component\Form\FormTypeInterface
return Symfony\Component\Form\FormTypeInterface

postTodosAction() public method

Creates a new todo from the submitted data.
public postTodosAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\RouteRedirectView
$request Symfony\Component\HttpFoundation\Request the request object
return Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\RouteRedirectView

putTodosAction() public method

Update existing todo from the submitted data or create a new todo at a specific location.
public putTodosAction ( Request $request, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request the request object
$id integer the todo id
return Symfony\Component\HttpFoundation\Response

removeTodosAction() public method

Removes a todo.
public removeTodosAction ( integer $id ) : Response
$id integer the todo id
return Symfony\Component\HttpFoundation\Response