TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider:
TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface tx_scheduler_SleepTask_AdditionalFieldProvider

Public Member Functions

 getAdditionalFields (array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject)
 
 validateAdditionalFields (array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject)
 
 saveAdditionalFields (array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task)
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Additional fields provider class for usage with the Scheduler's sleep task

Author
François Suter franc.nosp@m.ois@.nosp@m.typo3.nosp@m..org

Definition at line 21 of file SleepTaskAdditionalFieldProvider.php.

Member Function Documentation

◆ getAdditionalFields()

TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider::getAdditionalFields ( array &  $taskInfo,
  $task,
\TYPO3\CMS\Scheduler\Controller\SchedulerModuleController  $parentObject 
)

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

Parameters
array$taskInfoReference to the array containing the info used in the add/edit form
object$taskWhen editing, reference to the current task object. Null when adding.
\TYPO3\CMS\Scheduler\Controller\SchedulerModuleController$parentObjectReference to the calling object (Scheduler's BE module)
Returns
array Array containing all the information pertaining to the additional fields

Implements TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface.

Definition at line 32 of file SleepTaskAdditionalFieldProvider.php.

◆ saveAdditionalFields()

TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider::saveAdditionalFields ( array  $submittedData,
\TYPO3\CMS\Scheduler\Task\AbstractTask  $task 
)

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

Parameters
array$submittedDataArray containing the data submitted by the user
\TYPO3\CMS\Scheduler\Task\AbstractTask$taskReference to the current task object
Returns
void

Implements TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface.

Definition at line 86 of file SleepTaskAdditionalFieldProvider.php.

◆ validateAdditionalFields()

TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider::validateAdditionalFields ( array &  $submittedData,
\TYPO3\CMS\Scheduler\Controller\SchedulerModuleController  $parentObject 
)

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

Parameters
array$submittedDataReference to the array containing the data submitted by the user
\TYPO3\CMS\Scheduler\Controller\SchedulerModuleController$parentObjectReference to the calling object (Scheduler's BE module)
Returns
boolean TRUE if validation was ok (or selected class is not relevant), FALSE otherwise

Implements TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface.

Definition at line 67 of file SleepTaskAdditionalFieldProvider.php.

References $GLOBALS, and $result.