CropVariant
Table of Contents
Properties
-
$allowedAspectRatios
: array<string|int, Ratio>
-
$coverAreas
: array<string|int, Area>|null
-
$cropArea
: Area
-
$focusArea
: Area|null
-
$id
: string
-
$selectedRatio
: string
-
$title
: string
Methods
-
__construct()
: mixed
-
applyRatioRestrictionToSelectedCropArea()
: CropVariant
-
asArray()
: array<string|int, mixed>
-
createFromConfiguration()
: CropVariant
-
getCropArea()
: Area
-
getFocusArea()
: Area|null
-
getId()
: string
-
addAllowedAspectRatio()
: mixed
-
addCoverArea()
: mixed
-
setAllowedAspectRatios()
: mixed
-
setCoverAreas()
: mixed
$allowedAspectRatios
protected
array<string|int, Ratio>
$allowedAspectRatios
$coverAreas
protected
array<string|int, Area>|null
$coverAreas
$cropArea
protected
Area
$cropArea
$focusArea
protected
Area|null
$focusArea
$id
protected
string
$id
$selectedRatio
protected
string
$selectedRatio
$title
protected
string
$title
__construct()
public
__construct(string $id, string $title, Area $cropArea[, array<string|int, Ratio> $allowedAspectRatios = null ][, string|null $selectedRatio = null ][, Area|null $focusArea = null ][, array<string|int, Area>|null $coverAreas = null ]) : mixed
Parameters
-
$id
: string
-
-
$title
: string
-
-
$cropArea
: Area
-
-
$allowedAspectRatios
: array<string|int, Ratio>
= null
-
-
$selectedRatio
: string|null
= null
-
-
$focusArea
: Area|null
= null
-
-
$coverAreas
: array<string|int, Area>|null
= null
-
-
throws
-
InvalidConfigurationException
applyRatioRestrictionToSelectedCropArea()
public
applyRatioRestrictionToSelectedCropArea(FileInterface $file) : CropVariant
Parameters
-
$file
: FileInterface
-
asArray()
public
asArray() : array<string|int, mixed>
Return values
array<string|int, mixed>
createFromConfiguration()
public
static createFromConfiguration(string $id, array<string|int, mixed> $config) : CropVariant
Parameters
-
$id
: string
-
-
$config
: array<string|int, mixed>
-
-
throws
-
InvalidConfigurationException
getCropArea()
public
getCropArea() : Area
getFocusArea()
public
getFocusArea() : Area|null
getId()
public
getId() : string
addAllowedAspectRatio()
protected
addAllowedAspectRatio(Ratio $ratio) : mixed
Parameters
-
$ratio
: Ratio
-
-
throws
-
InvalidConfigurationException
addCoverArea()
protected
addCoverArea(Area $area) : mixed
Parameters
-
$area
: Area
-
-
throws
-
InvalidConfigurationException
setAllowedAspectRatios()
protected
setAllowedAspectRatios(Ratio ...$ratios) : mixed
Parameters
-
$ratios
: Ratio
-
-
throws
-
InvalidConfigurationException
setCoverAreas()
protected
setCoverAreas(Area ...$areas) : mixed
Parameters
-
$areas
: Area
-
-
throws
-
InvalidConfigurationException