Method |
Description |
|
addFormatsAndUrl ( Media $media ) : Media |
Adds thumbnails and image urls. |
|
delete ( integer $id, $checkSecurity = false ) |
Deletes a media with a given id. |
|
get ( string $locale, array $filter = [], integer $limit = null, integer $offset = null ) : Media[] |
Returns media with a given collection and/or ids and/or limit
if no arguments passed returns all media. |
|
getById ( integer $id, string $locale ) : Media |
Returns a media with a given id. |
|
getByIds ( array $ids, string $locale ) : Media[] |
Returns the medias with the given ids in the specified order. |
|
getCount ( ) : integer |
Return the count of the last get. |
|
getEntityById ( integer $id ) : Sulu\Bundle\MediaBundle\Entity\MediaInterface |
Returns a media entity with a given id. |
|
getFormatUrls ( array $ids, string $locale ) : array |
Takes an array of media ids and returns an array of formats and urls. |
|
getUrl ( string $id, string $fileName, string $version ) : string |
Returns download url for given id and filename. |
|
increaseDownloadCounter ( integer $fileVersionId ) : mixed |
Increase the download counter of a fileVersion. |
|
move ( integer $id, string $locale, integer $destCollection ) : Media |
Moves a media to a given collection. |
|
save ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile, array $data, integer $userId ) : Media |
Creates a new media or overrides an existing one. |
|