PHP Class Sulu\Bundle\MediaBundle\Media\FormatOptions\FormatOptionsManager

Inheritance: implements Sulu\Bundle\MediaBundle\Media\FormatOptions\FormatOptionsManagerInterface
Exibir arquivo Open project: sulu/sulu

Public Methods

Method Description
__construct ( Doctrine\ORM\EntityManagerInterface $em, Doctrine\ORM\EntityRepository $formatOptionsRepository, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager, Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManagerInterface $formatManager, array $formats )
delete ( $mediaId, $formatKey )
get ( $mediaId, $formatKey )
getAll ( $mediaId )
save ( $mediaId, $formatKey, array $data )

Private Methods

Method Description
entityToArray ( FormatOptions $formatOptions ) : array Converts a given entity to its array representation.
getFileVersionForMedia ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media ) : FileVersion Gets the latest file-version of a given media.
purgeMedia ( integer $mediaId, FileVersion $fileVersion ) Purges a file-version of a media with a given id.
setDataOnEntity ( FormatOptions $formatOptions, array $data ) : FormatOptions Sets a given array of data onto a given format-options entity.

Method Details

__construct() public method

public __construct ( Doctrine\ORM\EntityManagerInterface $em, Doctrine\ORM\EntityRepository $formatOptionsRepository, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager, Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManagerInterface $formatManager, array $formats )
$em Doctrine\ORM\EntityManagerInterface
$formatOptionsRepository Doctrine\ORM\EntityRepository
$mediaManager Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface
$formatManager Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManagerInterface
$formats array

delete() public method

public delete ( $mediaId, $formatKey )

get() public method

public get ( $mediaId, $formatKey )

getAll() public method

public getAll ( $mediaId )

save() public method

public save ( $mediaId, $formatKey, array $data )
$data array