CleanerFieldProvider extends AbstractAdditionalFieldProvider

A task that should be run regularly that deletes datasets flagged as "deleted" from the DB.

Internal

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
addMessage()  : void
Add a flash message
checkTcaIsNotEmpty()  : bool
Checks if the array is empty
checkTcaIsValid()  : bool
Checks if the given tables are in the TCA
getLanguageService()  : LanguageService
getTcaSelectHtml()  : string
Gets the select-box from the TCA-fields
validateAdditionalFieldPeriod()  : bool
Validates the input of period
validateAdditionalFieldTca()  : bool
Validates the selected Tables

Methods

getAdditionalFields()

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

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

Values of the fields from the add/edit task form

$task : CleanerTask

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('Identifier' => 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

Tags
throws
InvalidArgumentException

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

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

checkTcaIsNotEmpty()

Checks if the array is empty

protected checkTcaIsNotEmpty(array<string|int, mixed> $tca) : bool
Parameters
$tca : array<string|int, mixed>

The given TCA-tables as array

Return values
bool

TRUE if validation was ok, FALSE otherwise

checkTcaIsValid()

Checks if the given tables are in the TCA

protected checkTcaIsValid(array<string|int, mixed> $tca) : bool
Parameters
$tca : array<string|int, mixed>

The given TCA-tables as array

Return values
bool

TRUE if validation was ok, FALSE otherwise

getTcaSelectHtml()

Gets the select-box from the TCA-fields

protected getTcaSelectHtml([array<string|int, mixed> $selectedTables = [] ]) : string
Parameters
$selectedTables : array<string|int, mixed> = []
Return values
string

validateAdditionalFieldPeriod()

Validates the input of period

protected validateAdditionalFieldPeriod(int $period) : bool
Parameters
$period : int

The given period as integer

Return values
bool

TRUE if validation was ok, FALSE otherwise

validateAdditionalFieldTca()

Validates the selected Tables

protected validateAdditionalFieldTca(array<string|int, mixed> $tca) : bool
Parameters
$tca : array<string|int, mixed>

The given TCA-tables as array

Return values
bool

TRUE if validation was ok, FALSE otherwise


        
On this page

Search results