PHP Interface Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface

Show file Open project: sulu/sulu Interface Usage Examples

Public Methods

Method Description
count ( integer $depth, array $filter = [], Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection = null ) : integer Returns the number of matched collections by a given set of parameters.
countMedia ( Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection ) : integer Returns the number of media contained in a given collection.
countSubCollections ( Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection ) : integer Returns the number of sub collections contained in a given collection.
findCollectionBreadcrumbById ( integer $id ) : Collection[] Finds the breadcrumb of a collection with given id.
findCollectionById ( integer $id ) : Collection Finds the collection with a given id.
findCollectionByKey ( string $key ) : Collection Finds collection by key.
findCollectionSet ( integer $depth, array $filter = [], Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection = null, array $sortBy = [], Sulu\Component\Security\Authentication\UserInterface $user = null, integer $permission = null ) : Collection[] Finds a collection set starting by given ID and depth.
findCollectionTypeById ( integer $id ) : string Returns collection-type for collection-id.
findCollections ( array $filter = [], integer $limit = null, integer $offset = null, array $sortBy = [] ) : Collection[] finds all collections, can be filtered with parent and depth.
findTree ( id $id, string $locale ) : Collection[] Finds the parent collections and all the sliblings of them + the children of given id.

Method Details

count() public method

Returns the number of matched collections by a given set of parameters.
public count ( integer $depth, array $filter = [], Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection = null ) : integer
$depth integer The depth to which collections are loaded
$filter array The array of filters to apply
$collection Sulu\Bundle\MediaBundle\Entity\CollectionInterface
return integer The number of matched collections

countMedia() public method

Returns the number of media contained in a given collection.
public countMedia ( Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection ) : integer
$collection Sulu\Bundle\MediaBundle\Entity\CollectionInterface The collection for which the number of media should be returned
return integer The number of media in the given collection

countSubCollections() public method

Returns the number of sub collections contained in a given collection.
public countSubCollections ( Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection ) : integer
$collection Sulu\Bundle\MediaBundle\Entity\CollectionInterface The collectionf or which the number of sub collections should be returned
return integer The number of sub collection in the given collection

findCollectionBreadcrumbById() public method

Finds the breadcrumb of a collection with given id.
public findCollectionBreadcrumbById ( integer $id ) : Collection[]
$id integer
return Collection[]

findCollectionById() public method

Finds the collection with a given id.
public findCollectionById ( integer $id ) : Collection
$id integer
return Collection

findCollectionByKey() public method

Finds collection by key.
public findCollectionByKey ( string $key ) : Collection
$key string
return Collection

findCollectionSet() public method

Finds a collection set starting by given ID and depth.
public findCollectionSet ( integer $depth, array $filter = [], Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection = null, array $sortBy = [], Sulu\Component\Security\Authentication\UserInterface $user = null, integer $permission = null ) : Collection[]
$depth integer
$filter array
$collection Sulu\Bundle\MediaBundle\Entity\CollectionInterface
$sortBy array
$user Sulu\Component\Security\Authentication\UserInterface The user for which the additional access control should be checked
$permission integer The permission mask the user requires, if it is passed for the access control check
return Collection[]

findCollectionTypeById() public method

Returns collection-type for collection-id.
public findCollectionTypeById ( integer $id ) : string
$id integer
return string

findCollections() public method

finds all collections, can be filtered with parent and depth.
public findCollections ( array $filter = [], integer $limit = null, integer $offset = null, array $sortBy = [] ) : Collection[]
$filter array
$limit integer
$offset integer
$sortBy array sort by e.g. array('title' => 'ASC')
return Collection[]

findTree() public method

Finds the parent collections and all the sliblings of them + the children of given id.
public findTree ( id $id, string $locale ) : Collection[]
$id id
$locale string
return Collection[]