Property | Type | Description | |
---|---|---|---|
$assetCollections | Collection<\Neos\Media\Domain\Model\AssetCollection> | ||
$assetRepository | |||
$assetService | |||
$caption | string | ||
$lastModified | DateTime | ||
$persistenceManager | Neos\Flow\Persistence\PersistenceManagerInterface | ||
$resource | |||
$resourceManager | |||
$systemLogger | Neos\Flow\Log\SystemLoggerInterface | ||
$tags | Collection<\Neos\Media\Domain\Model\Tag> | ||
$thumbnailService | |||
$thumbnails | Collection<\Neos\Media\Domain\Model\Thumbnail> | ||
$title | string |
Method | Description | |
---|---|---|
__construct ( |
Constructs an asset. The resource is set internally and then initialize() is called. | |
addTag ( |
Add a single tag to this asset | |
addThumbnail ( |
An internal method which adds a thumbnail which was generated by the ThumbnailService. | |
getAssetCollections ( ) : Doctrine\Common\Collections\Collection | Return the asset collections this asset is included in | |
getCaption ( ) : string | The caption of this asset | |
getFileExtension ( ) : string | Returns a file extension fitting to the media type of this asset | |
getIdentifier ( ) : string | ||
getLabel ( ) : string | ||
getLastModified ( ) : DateTime | Returns the last modification timestamp for this asset | |
getMediaType ( ) : string | Returns the IANA media type of this asset | |
getResource ( ) : |
PersistentResource of the original file | |
getTags ( ) : Doctrine\Common\Collections\Collection | Return the tags assigned to this asset | |
getThumbnail ( integer $maximumWidth = null, integer $maximumHeight = null, string $ratioMode = ImageInterface::RATIOMODE_INSET, boolean $allowUpScaling = null ) : |
Returns a thumbnail of this asset | |
getTitle ( ) : string | The title of this image | |
getUsageCount ( ) : integer | Returns the number of times the asset is in use. | |
initializeObject ( integer $initializationCause ) : void | ||
isInUse ( ) : boolean | Returns true if the asset is still in use. | |
refresh ( ) : void | Refreshes this asset after the Resource or any other parameters affecting thumbnails have been modified | |
removeTag ( |
Remove a single tag from this asset | |
setAssetCollections ( Doctrine\Common\Collections\Collection $assetCollections ) : void | Set the asset collections that include this asset | |
setCaption ( string $caption ) : void | Sets the caption of this asset (optional) | |
setResource ( |
Sets the asset resource and (re-)initializes the asset. | |
setTags ( Doctrine\Common\Collections\Collection $tags ) : void | Set the tags assigned to this asset | |
setTitle ( string $title ) : void | Sets the title of this image (optional) |
Method | Description | |
---|---|---|
emitAssetCreated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void | Signals that an asset was created. | |
initialize ( ) : void | Override this to initialize upon instantiation. |
public __construct ( |
||
$resource |
public addThumbnail ( |
||
$thumbnail | ||
return | void |
protected emitAssetCreated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void | ||
$asset | Neos\Media\Domain\Model\AssetInterface | |
return | void |
public getAssetCollections ( ) : Doctrine\Common\Collections\Collection | ||
return | Doctrine\Common\Collections\Collection |
public getFileExtension ( ) : string | ||
return | string |
public getLastModified ( ) : DateTime | ||
return | DateTime | The date and time of last modification. |
public getMediaType ( ) : string | ||
return | string |
public getResource ( ) : |
||
return |
public getTags ( ) : Doctrine\Common\Collections\Collection | ||
return | Doctrine\Common\Collections\Collection |
public getThumbnail ( integer $maximumWidth = null, integer $maximumHeight = null, string $ratioMode = ImageInterface::RATIOMODE_INSET, boolean $allowUpScaling = null ) : |
||
$maximumWidth | integer | The thumbnail's maximum width in pixels |
$maximumHeight | integer | The thumbnail's maximum height in pixels |
$ratioMode | string | Whether the resulting image should be cropped if both edge's sizes are supplied that would hurt the aspect ratio |
$allowUpScaling | boolean | Whether the resulting image should be upscaled |
return |
public getUsageCount ( ) : integer | ||
return | integer |
protected initialize ( ) : void | ||
return | void |
public initializeObject ( integer $initializationCause ) : void | ||
$initializationCause | integer | |
return | void |
public setAssetCollections ( Doctrine\Common\Collections\Collection $assetCollections ) : void | ||
$assetCollections | Doctrine\Common\Collections\Collection | |
return | void |
public setCaption ( string $caption ) : void | ||
$caption | string | |
return | void |
public setResource ( |
||
$resource | ||
return | void |
protected Collection<\Neos\Media\Domain\Model\AssetCollection> $assetCollections | ||
return | Collection<\Neos\Media\Domain\Model\AssetCollection> |
protected AssetRepository,Neos\Media\Domain\Repository $assetRepository | ||
return |
protected AssetService,Neos\Media\Domain\Service $assetService | ||
return |
protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager | ||
return | Neos\Flow\Persistence\PersistenceManagerInterface |
protected PersistentResource,Neos\Flow\ResourceManagement $resource | ||
return |
protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager | ||
return |
protected SystemLoggerInterface,Neos\Flow\Log $systemLogger | ||
return | Neos\Flow\Log\SystemLoggerInterface |
protected Collection<\Neos\Media\Domain\Model\Tag> $tags | ||
return | Collection<\Neos\Media\Domain\Model\Tag> |
protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService | ||
return |
protected Collection<\Neos\Media\Domain\Model\Thumbnail> $thumbnails | ||
return | Collection<\Neos\Media\Domain\Model\Thumbnail> |