Свойство | Тип | Описание | |
---|---|---|---|
$count | integer |
Свойство | Тип | Описание | |
---|---|---|---|
$categoryRepository | Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface | ||
$collectionRepository | The repository for communication with the database. | ||
$mediaRepository | Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface | The repository for communication with the database. | |
$storage | Sulu\Bundle\MediaBundle\Media\Storage\StorageInterface | ||
$typeManager | Sulu\Bundle\MediaBundle\Media\TypeManager\TypeManagerInterface |
Метод | Описание | |
---|---|---|
__construct ( Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository, Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface $collectionRepository, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface $categoryRepository, |
||
addFormatsAndUrl ( |
||
delete ( $id, $checkSecurity = false ) | ||
get ( $locale, $filter = [], $limit = null, $offset = null ) | ||
getById ( $id, $locale ) | ||
getByIds ( array $ids, $locale ) | ||
getCollectionById ( $collectionId ) : object | ||
getCount ( ) | ||
getEntityById ( $id ) | ||
getFormatUrls ( $ids, $locale ) | ||
getUrl ( $id, $fileName, $version ) | ||
increaseDownloadCounter ( $fileVersionId ) | ||
move ( $id, $locale, $destCollection ) | ||
save ( $uploadedFile, $data, $userId ) |
Метод | Описание | |
---|---|---|
createMedia ( $data, $user ) : |
Create a new media. | |
getCurrentUser ( ) : Sulu\Component\Security\Authentication\UserInterface | void | Returns current user or null if no user is loggedin. | |
getUser ( $userId ) : Sulu\Component\Security\Authentication\UserInterface | Returns a user for a given user-id. | |
setDataToMedia ( |
Data can be set over by array. |
Метод | Описание | |
---|---|---|
buildData ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile, array $data, Sulu\Component\Security\Authentication\UserInterface $user ) : |
Prepares data. | |
getNormalizedFileName ( $originalFileName ) : string | Returns file name without special characters and preserves file extension. | |
getProperties ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile ) : array | ||
modifyMedia ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile, $data, Sulu\Component\Security\Authentication\UserInterface $user ) : |
Modifies an existing media. |
public __construct ( Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository, Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface $collectionRepository, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface $categoryRepository, |
||
$mediaRepository | Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface | |
$collectionRepository | Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface | |
$userRepository | Sulu\Component\Security\Authentication\UserRepositoryInterface | |
$categoryRepository | Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface | |
$em | ||
$storage | Sulu\Bundle\MediaBundle\Media\Storage\StorageInterface | |
$validator | Sulu\Bundle\MediaBundle\Media\FileValidator\FileValidatorInterface | |
$formatManager | Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManagerInterface | |
$tagManager | Sulu\Bundle\TagBundle\Tag\TagManagerInterface | |
$typeManager | Sulu\Bundle\MediaBundle\Media\TypeManager\TypeManagerInterface | |
$pathCleaner | Sulu\Component\PHPCR\PathCleanupInterface | |
$tokenStorage | Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | |
$securityChecker | Sulu\Component\Security\Authorization\SecurityCheckerInterface | |
$ffprobe | FFMpeg\FFProbe | |
$permissions | array | |
$downloadPath | string | |
$maxFileSize | string |
public addFormatsAndUrl ( |
||
$media | ||
Результат |
protected createMedia ( $data, $user ) : |
||
$data | ||
$user | ||
Результат |
public getCollectionById ( $collectionId ) : object | ||
$collectionId | ||
Результат | object |
protected getCurrentUser ( ) : Sulu\Component\Security\Authentication\UserInterface | void | ||
Результат | Sulu\Component\Security\Authentication\UserInterface | void |
protected getUser ( $userId ) : Sulu\Component\Security\Authentication\UserInterface | ||
$userId | ||
Результат | Sulu\Component\Security\Authentication\UserInterface |
protected setDataToMedia ( |
||
$media | ||
$data | ||
$user | Sulu\Component\Security\Authentication\UserInterface | |
Результат |
protected CategoryRepositoryInterface,Sulu\Bundle\CategoryBundle\Entity $categoryRepository | ||
Результат | Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface |
protected CollectionRepository,Sulu\Bundle\MediaBundle\Entity $collectionRepository | ||
Результат |
protected MediaRepositoryInterface,Sulu\Bundle\MediaBundle\Entity $mediaRepository | ||
Результат | Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface |
protected StorageInterface,Sulu\Bundle\MediaBundle\Media\Storage $storage | ||
Результат | Sulu\Bundle\MediaBundle\Media\Storage\StorageInterface |