TYPO3
7.6
|
Public Member Functions | |
__construct (Resource\ProcessedFile $targetFile, array $configuration) | |
getName () | |
getType () | |
getTargetFile () | |
getSourceFile () | |
getConfiguration () | |
getConfigurationChecksum () | |
getTargetFileName () | |
getTargetFileExtension () | |
fileNeedsProcessing () | |
isExecuted () | |
setExecuted ($successful) | |
isSuccessful () | |
A task is a unit of work that can be performed by a file processor. This may include multiple steps in any order, details depend on the configuration of the task and the tools the processor uses.
Each task has a type and a name. The type describes the category of the task, like "image" and "video". If your task is generic or applies to multiple types of files, use "general".
A task also already has to know the target file it should be executed on, so there is no "abstract" task that just specifies the steps to be executed without a concrete file. However, new tasks can easily be created from an existing task object.
Definition at line 30 of file core/Classes/Resource/Processing/TaskInterface.php.
__construct | ( | Resource\ProcessedFile | $targetFile, |
array | $configuration | ||
) |
\TYPO3\CMS\Core\Resource\ProcessedFile | $targetFile | |
array | $configuration |
Implemented in AbstractTask.
fileNeedsProcessing | ( | ) |
Returns TRUE if the file has to be processed at all, such as e.g. the original file does.
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().
Implemented in ImagePreviewTask, and ImageCropScaleMaskTask.
getConfiguration | ( | ) |
Returns the configuration for this task.
Implemented in AbstractTask.
Referenced by LocalPreviewHelper\process().
getConfigurationChecksum | ( | ) |
Returns the configuration checksum of this task.
Implemented in AbstractTask.
Referenced by LocalImageProcessor\checkForExistingTargetFile(), and LocalImageProcessor\processTask().
getName | ( | ) |
Returns the name of this task.
Implemented in AbstractTask.
Referenced by LocalImageProcessor\canProcessTask(), and LocalImageProcessor\processTask().
getSourceFile | ( | ) |
Returns the original file this task is based on.
Implemented in AbstractTask.
Referenced by LocalCropScaleMaskHelper\getFilenameForImageCropScaleMask(), LocalPreviewHelper\process(), and LocalImageProcessor\processTask().
getTargetFile | ( | ) |
Returns the processed file this task is executed on.
Implemented in AbstractTask.
Referenced by LocalImageProcessor\checkForExistingTargetFile(), LocalCropScaleMaskHelper\getFilenameForImageCropScaleMask(), and LocalImageProcessor\processTask().
getTargetFileExtension | ( | ) |
Gets the file extension the processed file should have in the filesystem.
Implemented in AbstractTask, and AbstractGraphicalTask.
Referenced by LocalPreviewHelper\getTemporaryFilePath().
getTargetFileName | ( | ) |
Returns the name the processed file should have in the filesystem.
Implemented in ImagePreviewTask, and ImageCropScaleMaskTask.
Referenced by LocalImageProcessor\checkForExistingTargetFile(), and LocalImageProcessor\processTask().
getType | ( | ) |
Returns the type of this task.
Implemented in AbstractTask.
Referenced by LocalImageProcessor\canProcessTask(), and LocalImageProcessor\processTask().
isExecuted | ( | ) |
Returns TRUE if this task has been executed, no matter if the execution was successful.
Implemented in AbstractTask.
isSuccessful | ( | ) |
Returns TRUE if this task has been successfully executed. Only call this method if the task has been processed at all.
\LogicException | If the task has not been executed already |
Implemented in AbstractTask.
setExecuted | ( | $successful | ) |
Mark this task as executed. This is used by the Processors in order to transfer the state of this task to the file processing service.
bool | $successful | Set this to FALSE if executing the task failed |
Implemented in AbstractTask.
Referenced by LocalImageProcessor\checkForExistingTargetFile(), and LocalImageProcessor\processTask().