PHP Interface Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface

Show file Open project: sulu/sulu Interface Usage Examples

Public Methods

Method Description
count ( array $filter ) : integer Returns amount of affected rows.
findMedia ( array $filter = [], integer $limit = null, integer $offset = null, Sulu\Component\Security\Authentication\UserInterface $user = null, null $permission = null ) : Media[] Finds all media, can be filtered with parent.
findMediaByCollectionId ( $collectionId, $limit, $offset ) : mixed
findMediaById ( $id ) : Media Finds the media with a given id.
findMediaByIdForRendering ( $id, $formatKey ) : Media Finds the media with a given id, with just enough information to be able to render the actual media.
findMediaDisplayInfo ( $ids, $locale ) : array Finds all the information needed to generate an url to the media and to display the media. The method finds the information for all medias with given ids.
findMediaWithFilenameInCollectionWithId ( string $filename, integer $collectionId ) : Media

Method Details

count() public method

Returns amount of affected rows.
public count ( array $filter ) : integer
$filter array
return integer

findMedia() public method

Finds all media, can be filtered with parent.
public findMedia ( array $filter = [], integer $limit = null, integer $offset = null, Sulu\Component\Security\Authentication\UserInterface $user = null, null $permission = null ) : Media[]
$filter array
$limit integer
$offset integer
$user Sulu\Component\Security\Authentication\UserInterface
$permission null
return Media[]

findMediaByCollectionId() public method

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

findMediaById() public method

Finds the media with a given id.
public findMediaById ( $id ) : Media
$id
return Media

findMediaByIdForRendering() public method

Finds the media with a given id, with just enough information to be able to render the actual media.
public findMediaByIdForRendering ( $id, $formatKey ) : Media
$id
$formatKey
return Media

findMediaDisplayInfo() public method

Finds all the information needed to generate an url to the media and to display the media. The method finds the information for all medias with given ids.
public findMediaDisplayInfo ( $ids, $locale ) : array
$ids array The ids of the medias for which the info should be found
$locale string The locale in which the display info should be loaded
return array

findMediaWithFilenameInCollectionWithId() public method

public findMediaWithFilenameInCollectionWithId ( string $filename, integer $collectionId ) : Media
$filename string
$collectionId integer
return Media