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