Copied!

VariationHandler

VariationHandler.php : 17

Interface for Variation services.

A variation service allows to generate variation from a given content field/version info (i.e. image aliases, variations of a document - doc, pdf...).

Methods

publicgetVariation()

VariationHandler.php : 31

Returns a Variation object for $field's $variationName.

public getVariation(Field $field, VersionInfo $versionInfo, string $variationName[, array<string|int, mixed> $parameters = [] ]) : Variation

This method is responsible to create the variation if needed. Variations might be applicable for images (aliases), documents...

Parameters

Name Type Default value Description
$field Field - -
$versionInfo VersionInfo - -
$variationName string - -
$parameters array<string|int, mixed> []

Hash of arbitrary parameters useful to generate the variation

Return values

Variation