ImageCropScaleMaskTask extends AbstractGraphicalTask
A task that takes care of cropping, scaling and/or masking an image.
Table of Contents
Properties
- $checksumData : array<string|int, mixed>
- $configuration : array<string|int, mixed>
- $executed : bool
- $name : string
- $sourceFile : File
- $successful : bool
- $targetFile : ProcessedFile
- $targetFileExtension : string|null
- $type : string
Methods
- __construct() : mixed
- fileNeedsProcessing() : bool
- Returns TRUE if the file has to be processed at all, such as e.g. the original file does.
- getConfiguration() : array<string|int, mixed>
- Returns the configuration for this task.
- getConfigurationChecksum() : string
- Returns the checksum for this task's configuration, also taking the file and task type into account.
- getName() : string
- Returns the name of this task
- getSourceFile() : File
- Returns the original file this task is based on.
- getTargetFile() : ProcessedFile
- Returns the processed file this task is executed on.
- getTargetFileExtension() : string
- Determines the file extension the processed file should have in the filesystem.
- getTargetFilename() : string
- Returns the name the processed file should have in the filesystem.
- getTargetFileName() : string
- Returns the name the processed file should have in the filesystem.
- getType() : string
- Returns the type of this task
- isExecuted() : bool
- Returns TRUE if this task has been executed, no matter if the execution was successful.
- isSuccessful() : bool
- Returns TRUE if this task has been successfully executed. Only call this method if the task has been processed at all.
- setExecuted() : mixed
- Set this task executed. This is used by the Processors in order to transfer the state of this task to the file processing service.
- setSourceFile() : mixed
- setTargetFile() : mixed
- determineTargetFileExtension() : string
- Gets the file extension the processed file should have in the filesystem by either using the configuration setting, or the extension of the original file.
- getChecksumData() : array<string|int, mixed>
- Sets parameters needed in the checksum. Can be overridden to add additional parameters to the checksum.
- isValidConfiguration() : bool
- Checks if the given configuration is sensible for this task, i.e. if all required parameters are given, within the boundaries and don't conflict with each other.
Properties
$checksumData
protected
array<string|int, mixed>
$checksumData
= []
$configuration
protected
array<string|int, mixed>
$configuration
$executed
protected
bool
$executed
= false
$name
protected
string
$name
= 'CropScaleMask'
$sourceFile
protected
File
$sourceFile
$successful
protected
bool
$successful
$targetFile
protected
ProcessedFile
$targetFile
$targetFileExtension
protected
string|null
$targetFileExtension
$type
protected
string
$type
= 'Image'
Methods
__construct()
public
__construct(ProcessedFile $targetFile, array<string|int, mixed> $configuration) : mixed
Parameters
- $targetFile : ProcessedFile
- $configuration : array<string|int, mixed>
fileNeedsProcessing()
Returns TRUE if the file has to be processed at all, such as e.g. the original file does.
public
fileNeedsProcessing() : bool
Note: This does not indicate if the concrete ProcessedFile attached to this task has to be (re)processed. This check is done in ProcessedFile::isOutdated(). @todo isOutdated()/needsReprocessing()?
Return values
boolgetConfiguration()
Returns the configuration for this task.
public
getConfiguration() : array<string|int, mixed>
Return values
array<string|int, mixed>getConfigurationChecksum()
Returns the checksum for this task's configuration, also taking the file and task type into account.
public
getConfigurationChecksum() : string
Return values
stringgetName()
Returns the name of this task
public
getName() : string
Return values
stringgetSourceFile()
Returns the original file this task is based on.
public
getSourceFile() : File
Return values
FilegetTargetFile()
Returns the processed file this task is executed on.
public
getTargetFile() : ProcessedFile
Return values
ProcessedFilegetTargetFileExtension()
Determines the file extension the processed file should have in the filesystem.
public
getTargetFileExtension() : string
Return values
stringgetTargetFilename()
Returns the name the processed file should have in the filesystem.
public
getTargetFilename() : string
Return values
stringgetTargetFileName()
Returns the name the processed file should have in the filesystem.
public
getTargetFileName() : string
Return values
stringgetType()
Returns the type of this task
public
getType() : string
Return values
stringisExecuted()
Returns TRUE if this task has been executed, no matter if the execution was successful.
public
isExecuted() : bool
Return values
boolisSuccessful()
Returns TRUE if this task has been successfully executed. Only call this method if the task has been processed at all.
public
isSuccessful() : bool
Tags
Return values
boolsetExecuted()
Set this task executed. This is used by the Processors in order to transfer the state of this task to the file processing service.
public
setExecuted(bool $successful) : mixed
Parameters
- $successful : bool
-
Set this to FALSE if executing the task failed
setSourceFile()
public
setSourceFile(File $sourceFile) : mixed
Parameters
- $sourceFile : File
setTargetFile()
public
setTargetFile(ProcessedFile $targetFile) : mixed
Parameters
- $targetFile : ProcessedFile
determineTargetFileExtension()
Gets the file extension the processed file should have in the filesystem by either using the configuration setting, or the extension of the original file.
protected
determineTargetFileExtension() : string
Return values
stringgetChecksumData()
Sets parameters needed in the checksum. Can be overridden to add additional parameters to the checksum.
protected
getChecksumData() : array<string|int, mixed>
This should include all parameters that could possibly vary between different task instances, e.g. the TYPO3 image configuration in TYPO3_CONF_VARS[GFX] for graphic processing tasks.
Return values
array<string|int, mixed>isValidConfiguration()
Checks if the given configuration is sensible for this task, i.e. if all required parameters are given, within the boundaries and don't conflict with each other.
protected
isValidConfiguration(array<string|int, mixed> $configuration) : bool
Parameters
- $configuration : array<string|int, mixed>