[FOLLOWUP][BUGFIX] keep options array for TableGarbageCollectionTask
[Packages/TYPO3.CMS.git] / typo3 / sysext / scheduler / Classes / AdditionalFieldProviderInterface.php
1 <?php
2 namespace TYPO3\CMS\Scheduler;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Interface for classes who want to provide additional fields when adding a task
19 *
20 * @author Ingo Renner <ingo@typo3.org>
21 */
22 interface AdditionalFieldProviderInterface {
23
24 /**
25 * Gets additional fields to render in the form to add/edit a task
26 *
27 * @param array $taskInfo Values of the fields from the add/edit task form
28 * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task The task object being edited. Null when adding a task!
29 * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
30 * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
31 */
32 public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule);
33
34 /**
35 * Validates the additional fields' values
36 *
37 * @param array $submittedData An array containing the data submitted by the add/edit task form
38 * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
39 * @return bool TRUE if validation was ok (or selected class is not relevant), FALSE otherwise
40 */
41 public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule);
42
43 /**
44 * Takes care of saving the additional fields' values in the task's object
45 *
46 * @param array $submittedData An array containing the data submitted by the add/edit task form
47 * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the scheduler backend module
48 * @return void
49 */
50 public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task);
51
52 }