TestTaskAdditionalFieldProvider

class \TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider

Extends
AbstractAdditionalFieldProvider

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

Table of Contents

Methods

getAdditionalFields()  : array
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 &$taskInfo, TestTask|null $task, SchedulerModuleController $schedulerModule) : array

Parameters

$taskInfo : array

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 —

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 $submittedData, TestTask $task) : mixed

Parameters

$submittedData : array

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 &$submittedData, SchedulerModuleController $schedulerModule) : bool

Parameters

$submittedData : array

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