class Audio extends Asset (View source)

An Audio asset

Properties

protected PersistenceManagerInterface $persistenceManager from  Asset
protected LoggerInterface $systemLogger from  Asset
protected ResourceManager $resourceManager from  Asset
protected ThumbnailService $thumbnailService from  Asset
protected AssetService $assetService from  Asset
protected AssetRepository $assetRepository from  Asset
protected ImportedAssetRepository $importedAssetRepository from  Asset
protected DateTime $lastModified from  Asset
protected string $title from  Asset
protected string $caption from  Asset
protected string $copyrightNotice from  Asset
protected PersistentResource $resource from  Asset
protected Thumbnail> $thumbnails from  Asset
protected Tag> $tags from  Asset
protected AssetCollection> $assetCollections from  Asset
string $assetSourceIdentifier from  Asset
protected array $assetSourcesConfiguration from  Asset
protected AssetSourceInterface[] $assetSources from  Asset

Methods

__construct(PersistentResource $resource)

Constructs an asset. The resource is set internally and then initialize() is called.

from  Asset
void
initializeObject(int $initializationCause)

No description

from  Asset
void
initialize()

Override this to initialize upon instantiation.

from  Asset
string
getIdentifier()

No description

from  Asset
string
getLabel()

No description

from  Asset
getLastModified()

Returns the last modification timestamp for this asset

from  Asset
void
setResource(PersistentResource $resource)

Sets the asset resource and (re-)initializes the asset.

from  Asset
PersistentResource
getResource()

PersistentResource of the original file

from  Asset
string
getFileExtension()

Returns a file extension fitting to the media type of this asset

from  Asset
string
getMediaType()

Returns the IANA media type of this asset

from  Asset
void
setTitle(string $title)

Sets the title of this image (optional)

from  Asset
string
getTitle()

The title of this image

from  Asset
void
setCaption(string $caption)

Sets the caption of this asset (optional)

from  Asset
string
getCaption()

The caption of this asset

from  Asset
string
getCopyrightNotice()

No description

from  Asset
void
setCopyrightNotice(string $copyrightNotice)

No description

from  Asset
Collection
getTags()

Return the tags assigned to this asset

from  Asset
bool
addTag(Tag $tag)

Add a single tag to this asset

from  Asset
getThumbnail(int $maximumWidth = null, int $maximumHeight = null, string $ratioMode = ImageInterface::RATIOMODE_INSET, bool $allowUpScaling = null)

Returns a thumbnail of this asset

from  Asset
mixed
addThumbnail(Thumbnail $thumbnail)

An internal method which adds a thumbnail which was generated by the ThumbnailService.

from  Asset
void
refresh()

Refreshes this asset after the Resource or any other parameters affecting thumbnails have been modified

from  Asset
void
setTags(Collection $tags)

Set the tags assigned to this asset

from  Asset
bool
removeTag(Tag $tag)

Remove a single tag from this asset

from  Asset
Collection
getAssetCollections()

Return the asset collections this asset is included in

from  Asset
void
setAssetCollections(Collection $assetCollections)

Set the asset collections that include this asset

from  Asset
void
setAssetSourceIdentifier(string $assetSourceIdentifier)

Set the asset source identifier for this asset

from  Asset
string|null
getAssetSourceIdentifier()

No description

from  Asset
AssetProxyInterface|null
getAssetProxy()

No description

from  Asset
bool
isInUse()

Returns true if the asset is still in use.

from  Asset
int
getUsageCount()

Returns the number of times the asset is in use.

from  Asset

Details

__construct(PersistentResource $resource)

Constructs an asset. The resource is set internally and then initialize() is called.

Parameters

PersistentResource $resource

Exceptions

Exception

void initializeObject(int $initializationCause)

No description

Parameters

int $initializationCause

Return Value

void

protected void initialize()

Override this to initialize upon instantiation.

Return Value

void

string getIdentifier()

No description

Return Value

string

string getLabel()

No description

Return Value

string

DateTime getLastModified()

Returns the last modification timestamp for this asset

Return Value

DateTime

The date and time of last modification.

void setResource(PersistentResource $resource)

Sets the asset resource and (re-)initializes the asset.

Parameters

PersistentResource $resource

Return Value

void

PersistentResource getResource()

PersistentResource of the original file

Return Value

PersistentResource

string getFileExtension()

Returns a file extension fitting to the media type of this asset

Return Value

string

string getMediaType()

Returns the IANA media type of this asset

Return Value

string

void setTitle(string $title)

Sets the title of this image (optional)

Parameters

string $title

Return Value

void

string getTitle()

The title of this image

Return Value

string

Title of the asset

void setCaption(string $caption)

Sets the caption of this asset (optional)

Parameters

string $caption

Return Value

void

string getCaption()

The caption of this asset

Return Value

string

string getCopyrightNotice()

No description

Return Value

string

void setCopyrightNotice(string $copyrightNotice)

No description

Parameters

string $copyrightNotice

Return Value

void

Collection getTags()

Return the tags assigned to this asset

Return Value

Collection

bool addTag(Tag $tag)

Add a single tag to this asset

Parameters

Tag $tag

The tag to add

Return Value

bool

true if the tag added was new, false if it already existed

Thumbnail getThumbnail(int $maximumWidth = null, int $maximumHeight = null, string $ratioMode = ImageInterface::RATIOMODE_INSET, bool $allowUpScaling = null)

Returns a thumbnail of this asset

If the maximum width / height is not specified or exceeds the original asset's dimensions, the width / height of the original asset is used.

Parameters

int $maximumWidth

The thumbnail's maximum width in pixels

int $maximumHeight

The thumbnail's maximum height in pixels

string $ratioMode

Whether the resulting image should be cropped if both edge's sizes are supplied that would hurt the aspect ratio

bool $allowUpScaling

Whether the resulting image should be upscaled

Return Value

Thumbnail

Exceptions

Exception
Exception

mixed addThumbnail(Thumbnail $thumbnail)

An internal method which adds a thumbnail which was generated by the ThumbnailService.

Parameters

Thumbnail $thumbnail

Return Value

mixed

See also

getThumbnail()

void refresh()

Refreshes this asset after the Resource or any other parameters affecting thumbnails have been modified

Return Value

void

void setTags(Collection $tags)

Set the tags assigned to this asset

Parameters

Collection $tags

Return Value

void

bool removeTag(Tag $tag)

Remove a single tag from this asset

Parameters

Tag $tag

Return Value

bool

Collection getAssetCollections()

Return the asset collections this asset is included in

Return Value

Collection

void setAssetCollections(Collection $assetCollections)

Set the asset collections that include this asset

Parameters

Collection $assetCollections

Return Value

void

void setAssetSourceIdentifier(string $assetSourceIdentifier)

Set the asset source identifier for this asset

This is an internal method which allows Neos / Flow to keep track of assets which were imported from external asset sources.

Parameters

string $assetSourceIdentifier

Return Value

void

string|null getAssetSourceIdentifier()

No description

Return Value

string|null

AssetProxyInterface|null getAssetProxy()

No description

Return Value

AssetProxyInterface|null

bool isInUse()

Returns true if the asset is still in use.

Return Value

bool

int getUsageCount()

Returns the number of times the asset is in use.

Return Value

int