class AssetVariantGenerator (View source)

Properties

protected AssetService $assetService
protected array $variantPresetsConfiguration
protected VariantPreset[] $variantPresets

Methods

array
getVariantPresets()

No description

array
createVariants(AssetInterface $asset)

No description

array
recreateVariants(AssetInterface $asset)

No description

AssetVariantInterface|null
createVariant(AssetInterface $asset, string $presetIdentifier, string $variantIdentifier)

No description

AssetVariantInterface|null
recreateVariant(AssetInterface $asset, string $presetIdentifier, string $variantIdentifier)

No description

renderVariant(AssetInterface $originalAsset, string $presetIdentifier, Variant $variantConfiguration)

No description

Details

array getVariantPresets()

No description

Return Value

array

array createVariants(AssetInterface $asset)

No description

Parameters

AssetInterface $asset

Return Value

array

The created variants (if any), with the preset identifier as array key

Exceptions

AssetVariantGeneratorException

array recreateVariants(AssetInterface $asset)

No description

Parameters

AssetInterface $asset

Return Value

array

The created variants (if any), with the preset identifier as array key

Exceptions

AssetVariantGeneratorException

AssetVariantInterface|null createVariant(AssetInterface $asset, string $presetIdentifier, string $variantIdentifier)

No description

Parameters

AssetInterface $asset
string $presetIdentifier
string $variantIdentifier

Return Value

AssetVariantInterface|null

The created variant (if any)

Exceptions

AssetVariantGeneratorException

AssetVariantInterface|null recreateVariant(AssetInterface $asset, string $presetIdentifier, string $variantIdentifier)

No description

Parameters

AssetInterface $asset
string $presetIdentifier
string $variantIdentifier

Return Value

AssetVariantInterface|null

The created variant (if any)

Exceptions

AssetVariantGeneratorException

protected AssetVariantInterface renderVariant(AssetInterface $originalAsset, string $presetIdentifier, Variant $variantConfiguration)

No description

Parameters

AssetInterface $originalAsset
string $presetIdentifier
Variant $variantConfiguration

Return Value

AssetVariantInterface

Exceptions

AssetVariantGeneratorException

protected AssetVariantInterface createAssetVariant(AssetInterface $asset)

No description

Parameters

AssetInterface $asset

Return Value

AssetVariantInterface

Exceptions

AssetVariantGeneratorException