TYPO3
7.6
|
Public Member Functions | |
injectResourceFactory (\TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory) | |
injectEnvironmentService (\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) | |
applyProcessingInstructions ($image, $processingInstructions) | |
getImageUri (FileInterface $image, $absolute=false) | |
getImage ($src, $image, $treatIdAsReference) | |
Protected Member Functions | |
getImageFromSourceString ($src, $treatIdAsReference) | |
setCompatibilityValues (ProcessedFile $processedImage) | |
getCompatibilityImageResourceValues (ProcessedFile $processedImage) | |
Protected Attributes | |
$resourceFactory | |
$environmentService | |
Service for processing images
Definition at line 27 of file ImageService.php.
applyProcessingInstructions | ( | $image, | |
$processingInstructions | |||
) |
Create a processed file
File | FileReference | $image | |
array | $processingInstructions |
Definition at line 63 of file ImageService.php.
References ProcessedFile\CONTEXT_IMAGECROPSCALEMASK, and ImageService\setCompatibilityValues().
|
protected |
Calculates the compatibility values This is duplicate code taken from ContentObjectRenderer::getImgResource() Ideally we should get rid of this code in both places.
ProcessedFile | $processedImage |
Definition at line 188 of file ImageService.php.
References $GLOBALS, ProcessedFile\calculateChecksum(), AbstractFile\getExtension(), ProcessedFile\getOriginalFile(), ProcessedFile\getProperty(), and ProcessedFile\getPublicUrl().
Referenced by ImageService\setCompatibilityValues().
getImage | ( | $src, | |
$image, | |||
$treatIdAsReference | |||
) |
Get File or FileReference object
This method is a factory and compatibility method that does not belong to this service, but is put here for pragmatic reasons for the time being. It should be removed once we do not support string sources for images anymore.
string | $src | |
mixed | $image | |
bool | $treatIdAsReference |
\UnexpectedValueException |
Definition at line 123 of file ImageService.php.
References elseif, and ImageService\getImageFromSourceString().
|
protected |
Get File or FileReference object by src
string | $src | |
bool | $treatIdAsReference |
Definition at line 146 of file ImageService.php.
References MathUtility\canBeInterpretedAsInteger().
Referenced by ImageService\getImage().
getImageUri | ( | FileInterface | $image, |
$absolute = false |
|||
) |
Get public url of image depending on the environment
FileInterface | $image | |
bool | FALSE | $absolute | Force absolute URL |
Definition at line 84 of file ImageService.php.
References $GLOBALS, elseif, GeneralUtility\getIndpEnv(), FileInterface\getPublicUrl(), and GeneralUtility\locationHeaderUrl().
injectEnvironmentService | ( | \TYPO3\CMS\Extbase\Service\EnvironmentService | $environmentService | ) |
\TYPO3\CMS\Extbase\Service\EnvironmentService | $environmentService |
Definition at line 50 of file ImageService.php.
References ImageService\$environmentService.
injectResourceFactory | ( | \TYPO3\CMS\Core\Resource\ResourceFactory | $resourceFactory | ) |
\TYPO3\CMS\Core\Resource\ResourceFactory | $resourceFactory |
Definition at line 42 of file ImageService.php.
References ImageService\$resourceFactory.
|
protected |
Set compatibility values to frontend controller object in case we are in frontend environment.
ProcessedFile | $processedImage |
Definition at line 171 of file ImageService.php.
References $GLOBALS, and ImageService\getCompatibilityImageResourceValues().
Referenced by ImageService\applyProcessingInstructions().
|
protected |
Definition at line 37 of file ImageService.php.
Referenced by ImageService\injectEnvironmentService().
|
protected |
Definition at line 32 of file ImageService.php.
Referenced by ImageService\injectResourceFactory().