PHP 클래스 Neos\Media\Domain\Model\Asset

It can be used as is to represent any asset for which no better match is available.
상속: implements Neos\Media\Domain\Model\AssetInterface
파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$assetCollections Collection<\Neos\Media\Domain\Model\AssetCollection>
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$assetService Neos\Media\Domain\Service\AssetService
$caption string
$lastModified DateTime
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$resource Neos\Flow\ResourceManagement\PersistentResource
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$systemLogger Neos\Flow\Log\SystemLoggerInterface
$tags Collection<\Neos\Media\Domain\Model\Tag>
$thumbnailService Neos\Media\Domain\Service\ThumbnailService
$thumbnails Collection<\Neos\Media\Domain\Model\Thumbnail>
$title string

공개 메소드들

메소드 설명
__construct ( PersistentResource $resource ) Constructs an asset. The resource is set internally and then initialize() is called.
addTag ( Tag $tag ) : boolean Add a single tag to this asset
addThumbnail ( Thumbnail $thumbnail ) : void 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 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 ) : Thumbnail 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 ( Tag $tag ) : boolean 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 ( PersistentResource $resource ) : void 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)

보호된 메소드들

메소드 설명
emitAssetCreated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void Signals that an asset was created.
initialize ( ) : void Override this to initialize upon instantiation.

메소드 상세

__construct() 공개 메소드

Constructs an asset. The resource is set internally and then initialize() is called.
public __construct ( PersistentResource $resource )
$resource Neos\Flow\ResourceManagement\PersistentResource

addTag() 공개 메소드

Add a single tag to this asset
public addTag ( Tag $tag ) : boolean
$tag Tag The tag to add
리턴 boolean TRUE if the tag added was new, FALSE if it already existed

addThumbnail() 공개 메소드

An internal method which adds a thumbnail which was generated by the ThumbnailService.
또한 보기: getThumbnail()
public addThumbnail ( Thumbnail $thumbnail ) : void
$thumbnail Thumbnail
리턴 void

emitAssetCreated() 보호된 메소드

Signals that an asset was created.
사용 중단: Will be removed with next major version of Neos.Media. Use AssetService::emitAssetCreated signal instead.
protected emitAssetCreated ( Neos\Media\Domain\Model\AssetInterface $asset ) : void
$asset Neos\Media\Domain\Model\AssetInterface
리턴 void

getAssetCollections() 공개 메소드

Return the asset collections this asset is included in
public getAssetCollections ( ) : Doctrine\Common\Collections\Collection
리턴 Doctrine\Common\Collections\Collection

getCaption() 공개 메소드

The caption of this asset
public getCaption ( ) : string
리턴 string

getFileExtension() 공개 메소드

Returns a file extension fitting to the media type of this asset
public getFileExtension ( ) : string
리턴 string

getIdentifier() 공개 메소드

public getIdentifier ( ) : string
리턴 string

getLabel() 공개 메소드

public getLabel ( ) : string
리턴 string

getLastModified() 공개 메소드

Returns the last modification timestamp for this asset
public getLastModified ( ) : DateTime
리턴 DateTime The date and time of last modification.

getMediaType() 공개 메소드

Returns the IANA media type of this asset
public getMediaType ( ) : string
리턴 string

getResource() 공개 메소드

PersistentResource of the original file
public getResource ( ) : PersistentResource
리턴 Neos\Flow\ResourceManagement\PersistentResource

getTags() 공개 메소드

Return the tags assigned to this asset
public getTags ( ) : Doctrine\Common\Collections\Collection
리턴 Doctrine\Common\Collections\Collection

getThumbnail() 공개 메소드

If the maximum width / height is not specified or exceeds the original asset's dimensions, the width / height of the original asset is used.
public getThumbnail ( integer $maximumWidth = null, integer $maximumHeight = null, string $ratioMode = ImageInterface::RATIOMODE_INSET, boolean $allowUpScaling = null ) : Thumbnail
$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
리턴 Thumbnail

getTitle() 공개 메소드

The title of this image
public getTitle ( ) : string
리턴 string

getUsageCount() 공개 메소드

Returns the number of times the asset is in use.
public getUsageCount ( ) : integer
리턴 integer

initialize() 보호된 메소드

Override this to initialize upon instantiation.
protected initialize ( ) : void
리턴 void

initializeObject() 공개 메소드

public initializeObject ( integer $initializationCause ) : void
$initializationCause integer
리턴 void

isInUse() 공개 메소드

Returns true if the asset is still in use.
public isInUse ( ) : boolean
리턴 boolean

refresh() 공개 메소드

Refreshes this asset after the Resource or any other parameters affecting thumbnails have been modified
public refresh ( ) : void
리턴 void

removeTag() 공개 메소드

Remove a single tag from this asset
public removeTag ( Tag $tag ) : boolean
$tag Tag
리턴 boolean

setAssetCollections() 공개 메소드

Set the asset collections that include this asset
public setAssetCollections ( Doctrine\Common\Collections\Collection $assetCollections ) : void
$assetCollections Doctrine\Common\Collections\Collection
리턴 void

setCaption() 공개 메소드

Sets the caption of this asset (optional)
public setCaption ( string $caption ) : void
$caption string
리턴 void

setResource() 공개 메소드

Sets the asset resource and (re-)initializes the asset.
public setResource ( PersistentResource $resource ) : void
$resource Neos\Flow\ResourceManagement\PersistentResource
리턴 void

setTags() 공개 메소드

Set the tags assigned to this asset
public setTags ( Doctrine\Common\Collections\Collection $tags ) : void
$tags Doctrine\Common\Collections\Collection
리턴 void

setTitle() 공개 메소드

Sets the title of this image (optional)
public setTitle ( string $title ) : void
$title string
리턴 void

프로퍼티 상세

$assetCollections 보호되어 있는 프로퍼티

protected Collection<\Neos\Media\Domain\Model\AssetCollection> $assetCollections
리턴 Collection<\Neos\Media\Domain\Model\AssetCollection>

$assetRepository 보호되어 있는 프로퍼티

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
리턴 Neos\Media\Domain\Repository\AssetRepository

$assetService 보호되어 있는 프로퍼티

protected AssetService,Neos\Media\Domain\Service $assetService
리턴 Neos\Media\Domain\Service\AssetService

$caption 보호되어 있는 프로퍼티

protected string $caption
리턴 string

$lastModified 보호되어 있는 프로퍼티

protected DateTime $lastModified
리턴 DateTime

$persistenceManager 보호되어 있는 프로퍼티

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
리턴 Neos\Flow\Persistence\PersistenceManagerInterface

$resource 보호되어 있는 프로퍼티

protected PersistentResource,Neos\Flow\ResourceManagement $resource
리턴 Neos\Flow\ResourceManagement\PersistentResource

$resourceManager 보호되어 있는 프로퍼티

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
리턴 Neos\Flow\ResourceManagement\ResourceManager

$systemLogger 보호되어 있는 프로퍼티

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
리턴 Neos\Flow\Log\SystemLoggerInterface

$tags 보호되어 있는 프로퍼티

protected Collection<\Neos\Media\Domain\Model\Tag> $tags
리턴 Collection<\Neos\Media\Domain\Model\Tag>

$thumbnailService 보호되어 있는 프로퍼티

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
리턴 Neos\Media\Domain\Service\ThumbnailService

$thumbnails 보호되어 있는 프로퍼티

protected Collection<\Neos\Media\Domain\Model\Thumbnail> $thumbnails
리턴 Collection<\Neos\Media\Domain\Model\Thumbnail>

$title 보호되어 있는 프로퍼티

protected string $title
리턴 string