PHP Class Sulu\Bundle\MediaBundle\Controller\CollectionController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface, implements Sulu\Component\Security\Authorization\AccessControl\SecuredObjectControllerInterface, use trait Sulu\Component\Rest\RequestParametersTrait
Show file Open project: sulu/sulu

Protected Properties

Property Type Description
$entityKey string
$entityName string

Public Methods

Method Description
cgetAction ( Request $request ) : Response lists all collections.
deleteAction ( $id ) : Response Delete a collection with the given id.
getAction ( $id, Request $request ) : Response Shows a single collection with the given id.
getFieldsAction ( ) : mixed returns all fields that can be used by list.
getSecuredClass ( )
getSecuredObjectId ( Request $request )
getSecurityContext ( ) : string
postAction ( Request $request ) : Response Creates a new collection.
postTriggerAction ( integer $id, Request $request ) : Response Trigger an action for given media. Action is specified over get-action parameter.
putAction ( integer $id, Request $request ) : Response Edits the existing collection with the given id.
putFieldsAction ( ) persists a setting.

Protected Methods

Method Description
getCollectionManager ( ) : Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface
getData ( Request $request ) : Collection
moveEntity ( integer $id, Request $request ) : Response Moves an entity into another one.
saveEntity ( $id, Request $request ) : Response

Private Methods

Method Description
getOffset ( Request $request, $limit ) : integer

Method Details

cgetAction() public method

lists all collections.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

deleteAction() public method

Delete a collection with the given id.
public deleteAction ( $id ) : Response
$id
return Symfony\Component\HttpFoundation\Response

getAction() public method

Shows a single collection with the given id.
public getAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

getCollectionManager() protected method

protected getCollectionManager ( ) : Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface
return Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface

getData() protected method

protected getData ( Request $request ) : Collection
$request Symfony\Component\HttpFoundation\Request
return Sulu\Bundle\MediaBundle\Api\Collection

getFieldsAction() public method

returns all fields that can be used by list.
public getFieldsAction ( ) : mixed
return mixed

getSecuredClass() public method

public getSecuredClass ( )

getSecuredObjectId() public method

public getSecuredObjectId ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getSecurityContext() public method

public getSecurityContext ( ) : string
return string

moveEntity() protected method

Moves an entity into another one.
protected moveEntity ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

postAction() public method

Creates a new collection.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

postTriggerAction() public method

Trigger an action for given media. Action is specified over get-action parameter.
public postTriggerAction ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

putAction() public method

Edits the existing collection with the given id.
public putAction ( integer $id, Request $request ) : Response
$id integer The id of the collection to update
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

putFieldsAction() public method

persists a setting.
public putFieldsAction ( )

saveEntity() protected method

protected saveEntity ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

Property Details

$entityKey protected static property

protected static string $entityKey
return string

$entityName protected static property

protected static string $entityName
return string