AdditionalFieldProviderInterface

Interface for classes who want to provide additional fields when adding a task

Table of Contents

Methods

getAdditionalFields()  : array<string|int, mixed>
Gets additional fields to render in the form to add/edit a task
saveAdditionalFields()  : mixed
Takes care of saving the additional fields' values in the task's object
validateAdditionalFields()  : bool
Validates the additional fields' values

Methods

getAdditionalFields()

Gets additional fields to render in the form to add/edit a task

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

Values of the fields from the add/edit task form

$task : AbstractTask|null

The task object being edited. Null when adding a task!

$schedulerModule : SchedulerModuleController

Reference to the scheduler backend module

Return values
array<string|int, mixed>

A two dimensional array: array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))

saveAdditionalFields()

Takes care of saving the additional fields' values in the task's object

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

An array containing the data submitted by the add/edit task form

$task : AbstractTask

Reference to the scheduler backend module

validateAdditionalFields()

Validates the additional fields' values

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

An array containing the data submitted by the add/edit task form

$schedulerModule : SchedulerModuleController

Reference to the scheduler backend module

Return values
bool

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


        
On this page

Search results