‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Processing\TaskInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Processing\TaskInterface:
TYPO3\CMS\Core\Resource\Processing\AbstractTask TYPO3\CMS\Core\Resource\Processing\ImageCropScaleMaskTask TYPO3\CMS\Core\Resource\Processing\ImagePreviewTask

Public Member Functions

 getName ()
 getType ()
 getTargetFile ()
 getSourceFile ()
 getConfiguration ()
 getConfigurationChecksum ()
 getTargetFileName ()
 getTargetFileExtension ()
 fileNeedsProcessing ()
 isExecuted ()
 setExecuted (bool $successful)
 isSuccessful ()
 sanitizeConfiguration ()

Detailed Description

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 33 of file TaskInterface.php.

Member Function Documentation

◆ fileNeedsProcessing()

TYPO3\CMS\Core\Resource\Processing\TaskInterface::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 TYPO3\CMS\Core\Resource\Processing\AbstractTask.

◆ getConfiguration()

◆ getConfigurationChecksum()

◆ getName()

◆ getSourceFile()

◆ getTargetFile()

◆ getTargetFileExtension()

◆ getTargetFileName()

◆ getType()

◆ isExecuted()

TYPO3\CMS\Core\Resource\Processing\TaskInterface::isExecuted ( )

Returns TRUE if this task has been executed, no matter if the execution was successful.

Implemented in TYPO3\CMS\Core\Resource\Processing\AbstractTask.

◆ isSuccessful()

TYPO3\CMS\Core\Resource\Processing\TaskInterface::isSuccessful ( )

Returns TRUE if this task has been successfully executed. Only call this method if the task has been processed at all.


Implemented in TYPO3\CMS\Core\Resource\Processing\AbstractTask.

◆ sanitizeConfiguration()

TYPO3\CMS\Core\Resource\Processing\TaskInterface::sanitizeConfiguration ( )

For some tasks it might be important and useful to clean up the configuration, in order to find the ProcessedFile that uses this configuration.

Ideally, a task has some information what needs to be used or not.

Implemented in TYPO3\CMS\Core\Resource\Processing\AbstractTask, and TYPO3\CMS\Core\Resource\Processing\ImagePreviewTask.

Referenced by TYPO3\CMS\Core\Resource\Processing\LocalPreviewHelper\process().

◆ setExecuted()

TYPO3\CMS\Core\Resource\Processing\TaskInterface::setExecuted ( bool  $successful)