CleanerFieldProvider

class \TYPO3\CMS\Recycler\Task\CleanerFieldProvider

Extends
AbstractAdditionalFieldProvider

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

Table of Contents

Methods

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

Parameters

$taskInfo : array

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 —

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

Parameters

$submittedData : array

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

Parameters

$submittedData : array

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

checkTcaIsNotEmpty()

Checks if the array is empty

protected checkTcaIsNotEmpty(array $tca) : bool

Parameters

$tca : array

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 $tca) : bool

Parameters

$tca : array

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 $selectedTables = [] ]) : string

Parameters

$selectedTables : array = []

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 $tca) : bool

Parameters

$tca : array

The given TCA-tables as array

Return values

bool —

TRUE if validation was ok, FALSE otherwise

On this page