PHP Class Sulu\Bundle\MediaBundle\Entity\MediaRepository

This class was generated by the Doctrine ORM. Add your own custom repository methods below.
Inheritance: extends Doctrine\ORM\EntityRepository, implements Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface
Show file Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
count ( array $filter )
findMedia ( $filter = [], $limit = null, $offset = null, Sulu\Component\Security\Authentication\UserInterface $user = null, $permission = null )
findMediaByCollectionId ( $collectionId, $limit, $offset ) : array
findMediaById ( $id, $asArray = false )
findMediaByIdForRendering ( $id, $formatKey )
findMediaDisplayInfo ( $ids, $locale )
findMediaWithFilenameInCollectionWithId ( string $filename, integer $collectionId ) : Media Returns the most recent version of a media for the specified filename within a collection.

Private Methods

Method Description
extractFilterVars ( array $filter ) : array Extracts filter vars.
getIds ( string $collection = null, boolean $systemCollections = true, array $types = null, string $search = null, string $orderBy = null, string $orderSort = null, integer $limit = null, integer $offset = null ) : array returns ids with given filters.
getIdsQuery ( string $collection = null, boolean $systemCollections = true, array $types = null, string $search = null, string $orderBy = null, string $orderSort = null, integer $limit = null, integer $offset = null, string $select = 'media.id' ) : Doctrine\ORM\Query create a query for ids with given filter.

Method Details

count() public method

public count ( array $filter )
$filter array

findMedia() public method

public findMedia ( $filter = [], $limit = null, $offset = null, Sulu\Component\Security\Authentication\UserInterface $user = null, $permission = null )
$user Sulu\Component\Security\Authentication\UserInterface

findMediaByCollectionId() public method

public findMediaByCollectionId ( $collectionId, $limit, $offset ) : array
$collectionId
$limit
$offset
return array

findMediaById() public method

public findMediaById ( $id, $asArray = false )

findMediaByIdForRendering() public method

public findMediaByIdForRendering ( $id, $formatKey )

findMediaDisplayInfo() public method

public findMediaDisplayInfo ( $ids, $locale )

findMediaWithFilenameInCollectionWithId() public method

Returns the most recent version of a media for the specified filename within a collection.
public findMediaWithFilenameInCollectionWithId ( string $filename, integer $collectionId ) : Media
$filename string
$collectionId integer
return Media