PHP Класс Neos\Media\Domain\Model\Image

Наследование: extends Asset, implements Neos\Media\Domain\Model\ImageInterface, implements Neos\Media\Domain\Model\VariantSupportInterface, use trait DimensionsTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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>