CropVariant
class \
Table of Contents
Properties
- $allowedAspectRatios : Ratio[]
- $coverAreas : Area[]|null
- $cropArea : Area
- $excludeFromSync : bool
- $focusArea : Area|null
- $id : string
- $selectedRatio : string
- $title : string
Methods
- __construct() : mixed
- applyRatioRestrictionToSelectedCropArea() : CropVariant
- asArray() : array
- createFromConfiguration() : CropVariant
- getCropArea() : Area
- getFocusArea() : Area|null
- getId() : string
- isExcludeFromSync() : bool
- setExcludeFromSync() : void
- addAllowedAspectRatio() : void
- addCoverArea() : void
- setAllowedAspectRatios() : void
- setCoverAreas() : void
Properties
$allowedAspectRatios
protected
Ratio[]
$allowedAspectRatios
= []
$coverAreas
protected
Area[]|null
$coverAreas
= null
$cropArea
protected
Area
$cropArea
$excludeFromSync
protected
bool
$excludeFromSync
= false
$focusArea
protected
Area|null
$focusArea
= null
$id
protected
string
$id
$selectedRatio
protected
string
$selectedRatio
= ''
$title
protected
string
$title
Methods
__construct()
public
__construct(string $id, string $title, Area $cropArea[, Ratio[] $allowedAspectRatios = null ][, string|null $selectedRatio = null ][, Area|null $focusArea = null ][, Area[]|null $coverAreas = null ][, bool $excludeFromSync = false ]) : mixed
Parameters
- $id : string
- $title : string
- $cropArea : Area
- $allowedAspectRatios : Ratio[] = null
- $selectedRatio : string|null = null
- $focusArea : Area|null = null
- $coverAreas : Area[]|null = null
- $excludeFromSync : bool = false
Tags
applyRatioRestrictionToSelectedCropArea()
public
applyRatioRestrictionToSelectedCropArea(FileInterface $file) : CropVariant
Parameters
- $file : FileInterface
Return values
CropVariantasArray()
public
asArray() : array
Internal
Return values
arraycreateFromConfiguration()
public
static createFromConfiguration(string $id, array $config) : CropVariant
Parameters
- $id : string
- $config : array
Tags
Return values
CropVariantgetCropArea()
public
getCropArea() : Area
Return values
AreagetFocusArea()
public
getFocusArea() : Area|null
Return values
Area|nullgetId()
public
getId() : string
Return values
stringisExcludeFromSync()
public
isExcludeFromSync() : bool
Return values
boolsetExcludeFromSync()
public
setExcludeFromSync(bool $excludeFromSync) : void
Parameters
- $excludeFromSync : bool
addAllowedAspectRatio()
protected
addAllowedAspectRatio(Ratio $ratio) : void
Parameters
- $ratio : Ratio
Tags
addCoverArea()
protected
addCoverArea(Area $area) : void
Parameters
- $area : Area
setAllowedAspectRatios()
protected
setAllowedAspectRatios(Ratio ...$ratios) : void
Parameters
- $ratios : Ratio
Tags
setCoverAreas()
protected
setCoverAreas(Area ...$areas) : void
Parameters
- $areas : Area