PHP Class Sulu\Bundle\CategoryBundle\Controller\KeywordController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface
Show file Open project: sulu/sulu

Protected Properties

Property Type Description
$entityKey

Public Methods

Method Description
cdeleteAction ( integer $categoryId, Request $request ) : Response Delete given keyword from given category.
cgetAction ( integer $categoryId, Request $request ) : Response Returns list of keywords filtered by the category.
deleteAction ( integer $categoryId, integer $keywordId ) : Response Delete given keyword from given category.
fieldsAction ( integer $categoryId ) : Response Returns field-descriptors for keywords.
getFieldDescriptors ( ) : Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[] Returns field descriptor for keyword.
getSecurityContext ( )
postAction ( integer $categoryId, Request $request ) : Response Creates new keyword for given category.
putAction ( integer $categoryId, integer $keywordId, Request $request ) : Response Updates given keyword for given category.

Private Methods

Method Description
getCategoryRepository ( ) : Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface
getEntityManager ( ) : Doctrine\ORM\EntityManagerInterface
getKeywordManager ( ) : KeywordManager
getKeywordRepository ( ) : Sulu\Bundle\CategoryBundle\Entity\KeywordRepositoryInterface

Method Details

cdeleteAction() public method

Delete given keyword from given category.
public cdeleteAction ( integer $categoryId, Request $request ) : Response
$categoryId integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

cgetAction() public method

Returns list of keywords filtered by the category.
public cgetAction ( integer $categoryId, Request $request ) : Response
$categoryId integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

deleteAction() public method

Delete given keyword from given category.
public deleteAction ( integer $categoryId, integer $keywordId ) : Response
$categoryId integer
$keywordId integer
return Symfony\Component\HttpFoundation\Response

fieldsAction() public method

Returns field-descriptors for keywords.
public fieldsAction ( integer $categoryId ) : Response
$categoryId integer
return Symfony\Component\HttpFoundation\Response

getFieldDescriptors() public method

Returns field descriptor for keyword.
public getFieldDescriptors ( ) : Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]
return Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

getSecurityContext() public method

public getSecurityContext ( )

postAction() public method

Creates new keyword for given category.
public postAction ( integer $categoryId, Request $request ) : Response
$categoryId integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

putAction() public method

Updates given keyword for given category.
public putAction ( integer $categoryId, integer $keywordId, Request $request ) : Response
$categoryId integer
$keywordId integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

Property Details

$entityKey protected static property

protected static $entityKey