PHP Class Sulu\Bundle\MediaBundle\Controller\MediaController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface, use trait Sulu\Component\Rest\RequestParametersTrait
Afficher le fichier Open project: sulu/sulu

Protected Properties

Свойство Type Description
$entityKey string

Méthodes publiques

Méthode Description
cgetAction ( Request $request ) : Response Lists all media.
deleteAction ( $id ) : Response Delete a media with the given id.
getAction ( $id, Request $request ) : Response Shows a single media with the given id.
getFieldsAction ( Request $request ) : Response returns all fields that can be used by list.
getSecuredClass ( ) : string Returns the class name of the object to check.
getSecuredObjectId ( Request $request ) : string Returns the id of the object to check.
getSecurityContext ( )
postAction ( Request $request ) : Response Creates a new media.
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 media with the given id.

Méthodes protégées

Méthode Description
getCollectionManager ( ) : Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface
getCollectionRepository ( ) : Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface
getFieldDescriptors ( string $locale, boolean $all = true ) : Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[] Returns field-descriptors for media.
getSecurityChecker ( ) : Sulu\Component\Security\Authorization\SecurityCheckerInterface
moveEntity ( integer $id, Request $request ) : Response Move an entity to another collection.
saveEntity ( $id, Request $request ) : Response

Private Methods

Méthode Description
getListBuilder ( Request $request, array $fieldDescriptors, array $ids, array $types ) : DoctrineListBuilder Returns a list-builder for media list.

Method Details

cgetAction() public méthode

Lists all media.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

deleteAction() public méthode

Delete a media with the given id.
public deleteAction ( $id ) : Response
$id
Résultat Symfony\Component\HttpFoundation\Response

getAction() public méthode

Shows a single media with the given id.
public getAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

getCollectionManager() protected méthode

protected getCollectionManager ( ) : Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface
Résultat Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface

getCollectionRepository() protected méthode

protected getCollectionRepository ( ) : Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface
Résultat Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface

getFieldDescriptors() protected méthode

Returns field-descriptors for media.
protected getFieldDescriptors ( string $locale, boolean $all = true ) : Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]
$locale string
$all boolean
Résultat Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

getFieldsAction() public méthode

returns all fields that can be used by list.
public getFieldsAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

getSecuredClass() public méthode

Returns the class name of the object to check.
public getSecuredClass ( ) : string
Résultat string

getSecuredObjectId() public méthode

Returns the id of the object to check.
public getSecuredObjectId ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request
Résultat string

getSecurityChecker() protected méthode

protected getSecurityChecker ( ) : Sulu\Component\Security\Authorization\SecurityCheckerInterface
Résultat Sulu\Component\Security\Authorization\SecurityCheckerInterface

getSecurityContext() public méthode

public getSecurityContext ( )

moveEntity() protected méthode

Move an entity to another collection.
protected moveEntity ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

postAction() public méthode

Creates a new media.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

postTriggerAction() public méthode

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
Résultat Symfony\Component\HttpFoundation\Response

putAction() public méthode

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

saveEntity() protected méthode

protected saveEntity ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

Property Details

$entityKey protected_oe static_oe property

protected static string $entityKey
Résultat string