PHP Class Sulu\Bundle\MediaBundle\Api\Media

Inheritance: extends Sulu\Component\Rest\ApiWrapper
Show file Open project: sulu/sulu Class Usage Examples

Protected Properties

Property Type Description
$additionalVersionData array
$file Sulu\Bundle\MediaBundle\Entity\File
$fileVersion Sulu\Bundle\MediaBundle\Entity\FileVersion
$formats array
$locale string
$localizedMeta Sulu\Bundle\MediaBundle\Entity\FileVersionMeta
$url string
$version integer

Public Methods

Method Description
__construct ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media, $locale, $version = null )
addCategory ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category ) Adds a category to the entity.
addTag ( Tag $tagEntity )
getAdditionalVersionData ( ) : array
getCategories ( ) : Category[] Returns the categories of the media.
getChanged ( ) : string
getChanger ( ) : string
getCollection ( ) : integer
getContentLanguages ( ) : array
getCopyright ( ) : string Returns copyright for media.
getCreated ( ) : mixed
getCreator ( ) : string
getCredits ( ) : string Returns copyright for media.
getDescription ( ) : string
getDownloadCounter ( ) : string
getFallbackLocale ( ) : string
getFile ( ) : File
getFileVersion ( ) : FileVersion
getFocusPointX ( ) : integer Returns the x coordinate of the focus point.
getFocusPointY ( ) : integer Returns the y coordinate of the focus point.
getFormats ( ) : array
getId ( ) : integer
getLocale ( ) : string
getMimeType ( ) : string
getName ( ) : integer
getProperties ( ) : array
getPublishLanguages ( ) : array
getSize ( ) : integer
getStorageOptions ( ) : string
getSubVersion ( ) : integer
getTags ( ) : array
getThumbnails ( ) : array
getTitle ( ) : string
getType ( ) : MediaType
getUrl ( ) : string
getVersion ( ) : integer
getVersions ( ) : array
isAudio ( ) : boolean
isDocument ( ) : boolean
isImage ( ) : boolean
isTypeOf ( string $type ) : boolean
isVideo ( ) : boolean
removeCategories ( ) Removes all category from the entity.
removeTags ( )
setAdditionalVersionData ( array $additionalVersionData )
setChanged ( DateTime | string $changed )
setChanger ( Sulu\Component\Security\Authentication\UserInterface $changer )
setCollection ( Collection $collection )
setContentLanguages ( array $contentLanguages )
setCopyright ( string $copyright )
setCreator ( Sulu\Component\Security\Authentication\UserInterface $creator )
setCredits ( string $credits )
setDescription ( string $description )
setFocusPointX ( integer $focusPointX ) Sets the x coordinate of the focus point.
setFocusPointY ( integer $focusPointY ) Sets the y coordinate of the focus point.
setFormats ( array $formats )
setMimeType ( string $mimeType )
setName ( integer $name )
setProperties ( array $properties )
setPublishLanguages ( array $publishLanguages )
setSize ( integer $size )
setStorageOptions ( string $storageOptions )
setTitle ( string $title )
setType ( MediaType $type )
setUrl ( string $url )
setVersion ( integer $version )

Private Methods

Method Description
getLocalizedMeta ( ) : FileVersionMeta Searches the meta for the file version in the media locale. Might also return a fallback.
getMeta ( boolean $create = false ) : FileVersionMeta

Method Details

__construct() public method

public __construct ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media, $locale, $version = null )
$media Sulu\Bundle\MediaBundle\Entity\MediaInterface

addCategory() public method

Adds a category to the entity.
public addCategory ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category )
$category Sulu\Bundle\CategoryBundle\Entity\CategoryInterface

addTag() public method

public addTag ( Tag $tagEntity )
$tagEntity Sulu\Bundle\TagBundle\Entity\Tag

getAdditionalVersionData() public method

public getAdditionalVersionData ( ) : array
return array

getCategories() public method

Returns the categories of the media.
public getCategories ( ) : Category[]
return Sulu\Bundle\CategoryBundle\Api\Category[]

getChanged() public method

public getChanged ( ) : string
return string

getChanger() public method

public getChanger ( ) : string
return string

getCollection() public method

public getCollection ( ) : integer
return integer

getContentLanguages() public method

public getContentLanguages ( ) : array
return array

getCopyright() public method

Returns copyright for media.
public getCopyright ( ) : string
return string

getCreated() public method

public getCreated ( ) : mixed
return mixed

getCreator() public method

public getCreator ( ) : string
return string

getCredits() public method

Returns copyright for media.
public getCredits ( ) : string
return string

getDescription() public method

public getDescription ( ) : string
return string

getDownloadCounter() public method

public getDownloadCounter ( ) : string
return string

getFallbackLocale() public method

public getFallbackLocale ( ) : string
return string

getFile() public method

public getFile ( ) : File
return Sulu\Bundle\MediaBundle\Entity\File

getFileVersion() public method

public getFileVersion ( ) : FileVersion
return Sulu\Bundle\MediaBundle\Entity\FileVersion

getFocusPointX() public method

Returns the x coordinate of the focus point.
public getFocusPointX ( ) : integer
return integer

getFocusPointY() public method

Returns the y coordinate of the focus point.
public getFocusPointY ( ) : integer
return integer

getFormats() public method

public getFormats ( ) : array
return array

getId() public method

public getId ( ) : integer
return integer

getLocale() public method

public getLocale ( ) : string
return string

getMimeType() public method

public getMimeType ( ) : string
return string

getName() public method

public getName ( ) : integer
return integer

getProperties() public method

public getProperties ( ) : array
return array

getPublishLanguages() public method

public getPublishLanguages ( ) : array
return array

getSize() public method

public getSize ( ) : integer
return integer

getStorageOptions() public method

public getStorageOptions ( ) : string
return string

getSubVersion() public method

public getSubVersion ( ) : integer
return integer

getTags() public method

public getTags ( ) : array
return array

getThumbnails() public method

public getThumbnails ( ) : array
return array

getTitle() public method

public getTitle ( ) : string
return string

getType() public method

public getType ( ) : MediaType
return Sulu\Bundle\MediaBundle\Entity\MediaType

getUrl() public method

public getUrl ( ) : string
return string

getVersion() public method

public getVersion ( ) : integer
return integer

getVersions() public method

public getVersions ( ) : array
return array

isAudio() public method

public isAudio ( ) : boolean
return boolean

isDocument() public method

public isDocument ( ) : boolean
return boolean

isImage() public method

public isImage ( ) : boolean
return boolean

isTypeOf() public method

public isTypeOf ( string $type ) : boolean
$type string
return boolean

isVideo() public method

public isVideo ( ) : boolean
return boolean

removeCategories() public method

Removes all category from the entity.
public removeCategories ( )

removeTags() public method

public removeTags ( )

setAdditionalVersionData() public method

public setAdditionalVersionData ( array $additionalVersionData )
$additionalVersionData array

setChanged() public method

public setChanged ( DateTime | string $changed )
$changed DateTime | string

setChanger() public method

public setChanger ( Sulu\Component\Security\Authentication\UserInterface $changer )
$changer Sulu\Component\Security\Authentication\UserInterface

setCollection() public method

public setCollection ( Collection $collection )
$collection Collection

setContentLanguages() public method

public setContentLanguages ( array $contentLanguages )
$contentLanguages array

setCopyright() public method

public setCopyright ( string $copyright )
$copyright string

setCreator() public method

public setCreator ( Sulu\Component\Security\Authentication\UserInterface $creator )
$creator Sulu\Component\Security\Authentication\UserInterface

setCredits() public method

public setCredits ( string $credits )
$credits string

setDescription() public method

public setDescription ( string $description )
$description string

setFocusPointX() public method

Sets the x coordinate of the focus point.
public setFocusPointX ( integer $focusPointX )
$focusPointX integer

setFocusPointY() public method

Sets the y coordinate of the focus point.
public setFocusPointY ( integer $focusPointY )
$focusPointY integer

setFormats() public method

public setFormats ( array $formats )
$formats array

setMimeType() public method

public setMimeType ( string $mimeType )
$mimeType string

setName() public method

public setName ( integer $name )
$name integer

setProperties() public method

public setProperties ( array $properties )
$properties array

setPublishLanguages() public method

public setPublishLanguages ( array $publishLanguages )
$publishLanguages array

setSize() public method

public setSize ( integer $size )
$size integer

setStorageOptions() public method

public setStorageOptions ( string $storageOptions )
$storageOptions string

setTitle() public method

public setTitle ( string $title )
$title string

setType() public method

public setType ( MediaType $type )
$type Sulu\Bundle\MediaBundle\Entity\MediaType

setUrl() public method

public setUrl ( string $url )
$url string

setVersion() public method

public setVersion ( integer $version )
$version integer

Property Details

$additionalVersionData protected property

protected array $additionalVersionData
return array

$file protected property

protected File,Sulu\Bundle\MediaBundle\Entity $file
return Sulu\Bundle\MediaBundle\Entity\File

$fileVersion protected property

protected FileVersion,Sulu\Bundle\MediaBundle\Entity $fileVersion
return Sulu\Bundle\MediaBundle\Entity\FileVersion

$formats protected property

protected array $formats
return array

$locale protected property

protected string $locale
return string

$localizedMeta protected property

protected FileVersionMeta,Sulu\Bundle\MediaBundle\Entity $localizedMeta
return Sulu\Bundle\MediaBundle\Entity\FileVersionMeta

$url protected property

protected string $url
return string

$version protected property

protected int $version
return integer