‪TYPO3CMS  10.4
TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider:
TYPO3\CMS\Scheduler\AbstractAdditionalFieldProvider TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface

Public Member Functions

array getAdditionalFields (array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
 
bool validateAdditionalFields (array &$submittedData, SchedulerModuleController $schedulerModule)
 
 saveAdditionalFields (array $submittedData, AbstractTask $task)
 

Protected Member Functions

LanguageService null getLanguageService ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Scheduler\AbstractAdditionalFieldProvider
 addMessage (string $message, int $severity=FlashMessage::OK)
 

Detailed Description

Additional fields provider class for usage with the Scheduler's test task

This class is an example is not considered part of the Public TYPO3 API.

Definition at line 29 of file TestTaskAdditionalFieldProvider.php.

Member Function Documentation

◆ getAdditionalFields()

array TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider::getAdditionalFields ( array &  $taskInfo,
  $task,
SchedulerModuleController  $schedulerModule 
)

This method is used to define new fields for adding or editing a task In this case, it adds an email field

Parameters
array$taskInfo‪Reference to the array containing the info used in the add/edit form
TestTask | null$task‪When editing, reference to the current task. NULL when adding.
SchedulerModuleController$schedulerModule‪Reference to the calling object (Scheduler's BE module)
Returns
‪array Array containing all the information pertaining to the additional fields

Implements TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface.

Definition at line 40 of file TestTaskAdditionalFieldProvider.php.

References $GLOBALS, TYPO3\CMS\Scheduler\Task\Enumeration\Action\ADD, TYPO3\CMS\Scheduler\Task\Enumeration\Action\EDIT, and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getCurrentAction().

◆ getLanguageService()

LanguageService null TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider::getLanguageService ( )
protected
Returns
‪LanguageService|null

Definition at line 108 of file TestTaskAdditionalFieldProvider.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider\validateAdditionalFields().

◆ saveAdditionalFields()

TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider::saveAdditionalFields ( array  $submittedData,
AbstractTask  $task 
)

This method is used to save any additional input into the current task object if the task class matches

Parameters
array$submittedData‪Array containing the data submitted by the user
TestTask$task‪Reference to the current task object

Implements TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface.

Definition at line 100 of file TestTaskAdditionalFieldProvider.php.

◆ validateAdditionalFields()

bool TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider::validateAdditionalFields ( array &  $submittedData,
SchedulerModuleController  $schedulerModule 
)

This method checks any additional data that is relevant to the specific task If the task class is not relevant, the method is expected to return TRUE

Parameters
array$submittedData‪Reference to the array containing the data submitted by the user
SchedulerModuleController$schedulerModule‪Reference to the calling object (Scheduler's BE module)
Returns
‪bool TRUE if validation was ok (or selected class is not relevant), FALSE otherwise

Implements TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface.

Definition at line 78 of file TestTaskAdditionalFieldProvider.php.

References TYPO3\CMS\Scheduler\AbstractAdditionalFieldProvider\addMessage(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider\getLanguageService().