PHP 인터페이스 Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface

The CollectionManager is responsible for the centralized management of our collections.
파일 보기 프로젝트 열기: sulu/sulu 0 사용 예제들

공개 메소드들

메소드 설명
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