TestTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvider

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

Internal

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

Table of Contents

Methods

getAdditionalFields()  : array<string|int, mixed>
This method is used to define new fields for adding or editing a task In this case, it adds an email field
saveAdditionalFields()  : mixed
This method is used to save any additional input into the current task object if the task class matches
validateAdditionalFields()  : bool
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
addMessage()  : void
Add a flash message
getLanguageService()  : LanguageService|null

Methods

getAdditionalFields()

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

public getAdditionalFields(array<string|int, mixed> &$taskInfo, TestTask|null $task, SchedulerModuleController $schedulerModule) : array<string|int, mixed>
Parameters
$taskInfo : array<string|int, mixed>

Reference to the array containing the info used in the add/edit form

$task : TestTask|null

When editing, reference to the current task. NULL when adding.

$schedulerModule : SchedulerModuleController

Reference to the calling object (Scheduler's BE module)

Return values
array<string|int, mixed>

Array containing all the information pertaining to the additional fields

saveAdditionalFields()

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

public saveAdditionalFields(array<string|int, mixed> $submittedData, TestTask $task) : mixed
Parameters
$submittedData : array<string|int, mixed>

Array containing the data submitted by the user

$task : TestTask

Reference to the current task object

validateAdditionalFields()

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

public validateAdditionalFields(array<string|int, mixed> &$submittedData, SchedulerModuleController $schedulerModule) : bool
Parameters
$submittedData : array<string|int, mixed>

Reference to the array containing the data submitted by the user

$schedulerModule : SchedulerModuleController

Reference to the calling object (Scheduler's BE module)

Return values
bool

TRUE if validation was ok (or selected class is not relevant), FALSE otherwise

addMessage()

Add a flash message

protected addMessage(string $message[, int $severity = FlashMessage::OK ]) : void
Parameters
$message : string

the flash message content

$severity : int = FlashMessage::OK

the flash message severity


        
On this page

Search results