TYPO3 CMS  TYPO3_8-7
TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection Class Reference

Public Member Functions

 __construct (array $cropVariants)
 
 asArray ()
 
 applyRatioRestrictionToSelectedCropArea (FileInterface $file)
 
 __toString ()
 
 getCropArea (string $id='default')
 
 getFocusArea (string $id='default')
 

Static Public Member Functions

static create (string $jsonString, array $tcaConfig=[])
 

Protected Member Functions

 setCropVariants (CropVariant ... $cropVariants)
 
 addCropVariant (CropVariant $cropVariant)
 

Static Protected Member Functions

static createEmpty ()
 

Protected Attributes

 $cropVariants
 

Detailed Description

Definition at line 20 of file CropVariantCollection.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::__construct ( array  $cropVariants)
Parameters
CropVariant[]cropVariants
Exceptions

Definition at line 31 of file CropVariantCollection.php.

References TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection\setCropVariants().

Member Function Documentation

◆ __toString()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::__toString ( )

Definition at line 109 of file CropVariantCollection.php.

◆ addCropVariant()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::addCropVariant ( CropVariant  $cropVariant)
protected

◆ applyRatioRestrictionToSelectedCropArea()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::applyRatioRestrictionToSelectedCropArea ( FileInterface  $file)

◆ asArray()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::asArray ( )
Returns
array

Definition at line 87 of file CropVariantCollection.php.

◆ create()

◆ createEmpty()

static TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::createEmpty ( )
staticprotected
Returns
CropVariantCollection

Definition at line 151 of file CropVariantCollection.php.

◆ getCropArea()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::getCropArea ( string  $id = 'default')
Parameters
string$id
Returns
Area

Definition at line 128 of file CropVariantCollection.php.

References TYPO3\CMS\Core\Imaging\ImageManipulation\Area\createEmpty().

◆ getFocusArea()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::getFocusArea ( string  $id = 'default')
Parameters
string$id
Returns
Area

Definition at line 140 of file CropVariantCollection.php.

References TYPO3\CMS\Core\Imaging\ImageManipulation\Area\createEmpty().

◆ setCropVariants()

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::setCropVariants ( CropVariant ...  $cropVariants)
protected

Member Data Documentation

◆ $cropVariants

TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::$cropVariants
protected