PHP Интерфейс Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface

The CollectionManager is responsible for the centralized management of our collections.
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
delete ( integer $id ) Deletes a collection with a given id.
get ( integer $locale, array $filter = [], integer $limit = null, integer $offset = null, array $sortBy = [] ) : Doctrine\ORM\Tools\Pagination\Paginator Returns collections with a given parent and/or a given depth-level if no arguments passed returns all collection.
getById ( integer $id, integer $locale, integer $depth, boolean $breadcrumb = false, array $filter = [], array $sortBy = [] ) : Collection Returns a collection with a given id.
getByKey ( string $key, string $locale ) : Collection Returns collection by key.
getCount ( ) : integer Returns a collection count.
getFieldDescriptor ( string $key ) : DoctrineFieldDescriptor Return the FieldDescriptors.
getFieldDescriptors ( ) : DoctrineFieldDescriptor[] Return the FieldDescriptors.
getTree ( string $locale, integer $offset, integer $limit, string $search, integer $depth, array $sortBy = [], boolean $systemCollections = true ) : Collection[] Returns collections from root with given depth.
getTreeById ( integer $id, string $locale ) : Collection[] Returns tree for given id. Including all parents with sliblings and children.
move ( integer $id, string $locale, integer | null $destinationId = null ) : Collection Moves a collection into another collection If you pass parentId = null i moves to the root.
save ( array $data, integer $userId ) : Collection Creates a new collection or overrides an existing one.

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

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

Deletes a collection with a given id.
public delete ( integer $id )
$id integer the id of the category to delete

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

Returns collections with a given parent and/or a given depth-level if no arguments passed returns all collection.
public get ( integer $locale, array $filter = [], integer $limit = null, integer $offset = null, array $sortBy = [] ) : Doctrine\ORM\Tools\Pagination\Paginator
$locale integer the locale which the collection should be return
$filter array for parent or depth
$limit integer limit the output
$offset integer offset the output
$sortBy array sort by e.g. array('title' => 'ASC')
Результат Doctrine\ORM\Tools\Pagination\Paginator

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

Returns a collection with a given id.
public getById ( integer $id, integer $locale, integer $depth, boolean $breadcrumb = false, array $filter = [], array $sortBy = [] ) : Collection
$id integer the id of the collection
$locale integer the locale which the collection should be return
$depth integer if depth > 1 children will returned also
$breadcrumb boolean if true breadcrumb will be appended
$filter array array of criteria
$sortBy array fields to sort by
Результат Sulu\Bundle\MediaBundle\Api\Collection

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

Returns collection by key.
public getByKey ( string $key, string $locale ) : Collection
$key string
$locale string
Результат Sulu\Bundle\MediaBundle\Api\Collection

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

Returns a collection count.
public getCount ( ) : integer
Результат integer

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

Return the FieldDescriptors.
public getFieldDescriptor ( string $key ) : DoctrineFieldDescriptor
$key string
Результат Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor

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

Return the FieldDescriptors.
public getFieldDescriptors ( ) : DoctrineFieldDescriptor[]
Результат Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]

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

Returns collections from root with given depth.
public getTree ( string $locale, integer $offset, integer $limit, string $search, integer $depth, array $sortBy = [], boolean $systemCollections = true ) : Collection[]
$locale string the locale which the collection should be return
$offset integer
$limit integer
$search string
$depth integer maximum depth for query
$sortBy array
$systemCollections boolean Whether or not system collectino should be included in the result
Результат Sulu\Bundle\MediaBundle\Api\Collection[]

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

Returns tree for given id. Including all parents with sliblings and children.
public getTreeById ( integer $id, string $locale ) : Collection[]
$id integer
$locale string
Результат Sulu\Bundle\MediaBundle\Api\Collection[]

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

Moves a collection into another collection If you pass parentId = null i moves to the root.
public move ( integer $id, string $locale, integer | null $destinationId = null ) : Collection
$id integer the id of the category to move
$locale string the locale which the collection should be return
$destinationId integer | null the parent where the collection should be placed
Результат Sulu\Bundle\MediaBundle\Api\Collection

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

Creates a new collection or overrides an existing one.
public save ( array $data, integer $userId ) : Collection
$data array The data of the category to save
$userId integer The id of the user, who is doing this change
Результат Sulu\Bundle\MediaBundle\Api\Collection