CropVariant

class \TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariant

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

$excludeFromSync

protected bool $excludeFromSync = false

$selectedRatio

protected string $selectedRatio = ''

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

throws
InvalidConfigurationException

asArray()

public asArray() : array

Return values

array

getId()

public getId() : string

Return values

string

isExcludeFromSync()

public isExcludeFromSync() : bool

Return values

bool

setExcludeFromSync()

public setExcludeFromSync(bool $excludeFromSync) : void

Parameters

$excludeFromSync : bool

setCoverAreas()

protected setCoverAreas(Area ...$areas) : void

Parameters

$areas : Area
On this page