[BUGFIX] Add icon rendering for custom permissions options
[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 interface AdditionalFieldProviderInterface
21 {
22 /**
23 * Gets additional fields to render in the form to add/edit a task
24 *
25 * @param array $taskInfo Values of the fields from the add/edit task form
26 * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task The task object being edited. Null when adding a task!
27 * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
28 * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
29 */
30 public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule);
31
32 /**
33 * Validates the additional fields' values
34 *
35 * @param array $submittedData An array containing the data submitted by the add/edit task form
36 * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
37 * @return bool TRUE if validation was ok (or selected class is not relevant), FALSE otherwise
38 */
39 public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule);
40
41 /**
42 * Takes care of saving the additional fields' values in the task's object
43 *
44 * @param array $submittedData An array containing the data submitted by the add/edit task form
45 * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the scheduler backend module
46 * @return void
47 */
48 public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task);
49 }