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

상속: extends Asset, implements Neos\Media\Domain\Model\ImageInterface, implements Neos\Media\Domain\Model\VariantSupportInterface, use trait DimensionsTrait
파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$imageService Neos\Media\Domain\Service\ImageService
$variants Collection<\Neos\Media\Domain\Model\ImageVariant>

공개 메소드들

메소드 설명
__construct ( PersistentResource $resource ) Constructor
addVariant ( ImageVariant $variant ) : void Adds a variant of this image
getVariants ( ) : array Returns all variants (if any) derived from this asset
initializeObject ( integer $initializationCause ) : void
refresh ( ) : void Calculates image width and height from the image resource.

보호된 메소드들

메소드 설명
calculateDimensionsFromResource ( PersistentResource $resource ) : void Calculates and sets the width and height of this Image asset based on the given PersistentResource.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( PersistentResource $resource )
$resource Neos\Flow\ResourceManagement\PersistentResource

addVariant() 공개 메소드

Note that you should try to re-use variants if you need to adjust them, rather than creating a new variant for every change. Non-used variants will remain in the database and block resource disk space until they are removed explicitly or the original image is deleted.
public addVariant ( ImageVariant $variant ) : void
$variant ImageVariant The new variant
리턴 void

calculateDimensionsFromResource() 보호된 메소드

Calculates and sets the width and height of this Image asset based on the given PersistentResource.
protected calculateDimensionsFromResource ( PersistentResource $resource ) : void
$resource Neos\Flow\ResourceManagement\PersistentResource
리턴 void

getVariants() 공개 메소드

Returns all variants (if any) derived from this asset
public getVariants ( ) : array
리턴 array

initializeObject() 공개 메소드

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

refresh() 공개 메소드

Calculates image width and height from the image resource.
public refresh ( ) : void
리턴 void

프로퍼티 상세

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

protected ImageService,Neos\Media\Domain\Service $imageService
리턴 Neos\Media\Domain\Service\ImageService

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

protected Collection<\Neos\Media\Domain\Model\ImageVariant> $variants
리턴 Collection<\Neos\Media\Domain\Model\ImageVariant>