PHP Class Ojs\ApiBundle\Handler\PostHandler

Exibir arquivo Open project: ojs/ojs

Public Methods

Method Description
__construct ( Doctrine\Common\Persistence\ObjectManager $om, $entityClass, Symfony\Component\Form\FormFactoryInterface $formFactory )
all ( integer $limit = 5, integer $offset ) : array Get a list of Posts.
delete ( AdminPost $entity ) : AdminPost Delete a Post.
get ( mixed $id ) : AdminPost Get a Post.
patch ( AdminPost $entity, array $parameters ) : AdminPost Partially update a Post.
post ( array $parameters ) : AdminPost Create a new Post.
put ( AdminPost $entity, array $parameters ) : AdminPost Edit a Post.

Private Methods

Method Description
createPost ( )
processForm ( AdminPost $entity, array $parameters, String $method = "PUT" ) : AdminPost Processes the form.

Method Details

__construct() public method

public __construct ( Doctrine\Common\Persistence\ObjectManager $om, $entityClass, Symfony\Component\Form\FormFactoryInterface $formFactory )
$om Doctrine\Common\Persistence\ObjectManager
$formFactory Symfony\Component\Form\FormFactoryInterface

all() public method

Get a list of Posts.
public all ( integer $limit = 5, integer $offset ) : array
$limit integer the limit of the result
$offset integer starting from the offset
return array

delete() public method

Delete a Post.
public delete ( AdminPost $entity ) : AdminPost
$entity Ojs\AdminBundle\Entity\AdminPost
return Ojs\AdminBundle\Entity\AdminPost

get() public method

Get a Post.
public get ( mixed $id ) : AdminPost
$id mixed
return Ojs\AdminBundle\Entity\AdminPost

patch() public method

Partially update a Post.
public patch ( AdminPost $entity, array $parameters ) : AdminPost
$entity Ojs\AdminBundle\Entity\AdminPost
$parameters array
return Ojs\AdminBundle\Entity\AdminPost

post() public method

Create a new Post.
public post ( array $parameters ) : AdminPost
$parameters array
return Ojs\AdminBundle\Entity\AdminPost

put() public method

Edit a Post.
public put ( AdminPost $entity, array $parameters ) : AdminPost
$entity Ojs\AdminBundle\Entity\AdminPost
$parameters array
return Ojs\AdminBundle\Entity\AdminPost