PHP Interface Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface

Afficher le fichier Open project: sulu/sulu Interface Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat integer The number of matched collections

countMedia() public méthode

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
Résultat integer The number of media in the given collection

countSubCollections() public méthode

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
Résultat integer The number of sub collection in the given collection

findCollectionBreadcrumbById() public méthode

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

findCollectionById() public méthode

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

findCollectionByKey() public méthode

Finds collection by key.
public findCollectionByKey ( string $key ) : Collection
$key string
Résultat Collection

findCollectionSet() public méthode

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
Résultat Collection[]

findCollectionTypeById() public méthode

Returns collection-type for collection-id.
public findCollectionTypeById ( integer $id ) : string
$id integer
Résultat string

findCollections() public méthode

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')
Résultat Collection[]

findTree() public méthode

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
Résultat Collection[]