PHP Класс Sulu\Bundle\MediaBundle\Controller\MediaController

Наследование: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface, use trait Sulu\Component\Rest\RequestParametersTrait
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$entityKey string

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
getListBuilder ( Request $request, array $fieldDescriptors, array $ids, array $types ) : DoctrineListBuilder Returns a list-builder for media list.

Описание методов

cgetAction() публичный Метод

Lists all media.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

deleteAction() публичный Метод

Delete a media with the given id.
public deleteAction ( $id ) : Response
$id
Результат Symfony\Component\HttpFoundation\Response

getAction() публичный Метод

Shows a single media with the given id.
public getAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

getCollectionManager() защищенный Метод

protected getCollectionManager ( ) : Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface
Результат Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface

getCollectionRepository() защищенный Метод

protected getCollectionRepository ( ) : Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface
Результат Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface

getFieldDescriptors() защищенный Метод

Returns field-descriptors for media.
protected getFieldDescriptors ( string $locale, boolean $all = true ) : Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]
$locale string
$all boolean
Результат Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

getFieldsAction() публичный Метод

returns all fields that can be used by list.
public getFieldsAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

getSecuredClass() публичный Метод

Returns the class name of the object to check.
public getSecuredClass ( ) : string
Результат string

getSecuredObjectId() публичный Метод

Returns the id of the object to check.
public getSecuredObjectId ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request
Результат string

getSecurityChecker() защищенный Метод

protected getSecurityChecker ( ) : Sulu\Component\Security\Authorization\SecurityCheckerInterface
Результат Sulu\Component\Security\Authorization\SecurityCheckerInterface

getSecurityContext() публичный Метод

public getSecurityContext ( )

moveEntity() защищенный Метод

Move an entity to another collection.
protected moveEntity ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

postAction() публичный Метод

Creates a new media.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

postTriggerAction() публичный Метод

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
Результат Symfony\Component\HttpFoundation\Response

putAction() публичный Метод

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
Результат Symfony\Component\HttpFoundation\Response

saveEntity() защищенный Метод

protected saveEntity ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

Описание свойств

$entityKey защищенное статическое свойство

protected static string $entityKey
Результат string