‪TYPO3CMS  11.5
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\AbstractGraphicalTask TYPO3\CMS\Core\Resource\Processing\ImageCropScaleMaskTask TYPO3\CMS\Core\Resource\Processing\ImagePreviewTask

Public Member Functions

 __construct (ProcessedFile $targetFile, array $configuration)
string getName ()
string getType ()
Resource ProcessedFile getTargetFile ()
Resource File getSourceFile ()
array getConfiguration ()
string getConfigurationChecksum ()
string getTargetFileName ()
string getTargetFileExtension ()
bool fileNeedsProcessing ()
bool isExecuted ()
 setExecuted ($successful)
bool isSuccessful ()

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

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\Processing\TaskInterface::__construct ( ProcessedFile  $targetFile,
array  $configuration 

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

Member Function Documentation

◆ fileNeedsProcessing()

bool 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\ImagePreviewTask, and TYPO3\CMS\Core\Resource\Processing\ImageCropScaleMaskTask.

◆ getConfiguration()

◆ getConfigurationChecksum()

◆ getName()

◆ getSourceFile()

◆ getTargetFile()

◆ getTargetFileExtension()

◆ getTargetFileName()

◆ getType()

◆ isExecuted()

bool 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()

bool 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.

◆ setExecuted()

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

Referenced by TYPO3\CMS\Core\Resource\Processing\LocalImageProcessor\checkForExistingTargetFile(), TYPO3\CMS\Core\Resource\Processing\SvgImageProcessor\processTask(), TYPO3\CMS\Backend\Resource\Processing\DeferredBackendImageProcessor\processTask(), and TYPO3\CMS\Core\Resource\Processing\LocalImageProcessor\processTaskWithLocalFile().