|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license GPLv3, http://www.gnu.org/copyleft/gpl.html |
|
5
|
|
|
* @copyright Metaways Infosystems GmbH, 2014 |
|
6
|
|
|
* @copyright Aimeos (aimeos.org), 2014-2016 |
|
7
|
|
|
* @package TYPO3 |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
namespace Aimeos\Aimeos\Scheduler\Provider; |
|
12
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Additional field provider for Aimeos scheduler. |
|
16
|
|
|
* |
|
17
|
|
|
* @package TYPO3 |
|
18
|
|
|
*/ |
|
19
|
|
|
class Typo6 extends AbstractProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface |
|
20
|
|
|
{ |
|
21
|
|
|
/** |
|
22
|
|
|
* Fields generation. |
|
23
|
|
|
* This method is used to define new fields for adding or editing a task |
|
24
|
|
|
* In this case, it adds a page ID field |
|
25
|
|
|
* |
|
26
|
|
|
* @param array $taskInfo Reference to the array containing the info used in the add/edit form |
|
27
|
|
|
* @param object $task When editing, reference to the current task object. Null when adding. |
|
28
|
|
|
* @param tx_scheduler_Module $parentObject Reference to the calling object (Scheduler's BE module) |
|
|
|
|
|
|
29
|
|
|
* @return array Array containg all the information pertaining to the additional fields |
|
30
|
|
|
* The array is multidimensional, keyed to the task class name and each field's id |
|
31
|
|
|
* For each field it provides an associative sub-array with the following: |
|
32
|
|
|
* ['code'] => The HTML code for the field |
|
33
|
|
|
* ['label'] => The label of the field (possibly localized) |
|
34
|
|
|
* ['cshKey'] => The CSH key for the field |
|
35
|
|
|
* ['cshLabel'] => The code of the CSH label |
|
36
|
|
|
*/ |
|
37
|
|
|
public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) |
|
38
|
|
|
{ |
|
39
|
|
|
try { |
|
40
|
|
|
return $this->getFields($taskInfo, $task, $parentObject); |
|
41
|
|
|
} catch(\Exception $e) { |
|
42
|
|
|
$this->addMessage($e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
return []; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* Store fields. |
|
51
|
|
|
* This method is used to save any additional input into the current task object |
|
52
|
|
|
* if the task class matches |
|
53
|
|
|
* |
|
54
|
|
|
* @param array $submittedData Array containing the data submitted by the user |
|
55
|
|
|
* @param tx_scheduler_Task $task Reference to the current task object |
|
|
|
|
|
|
56
|
|
|
*/ |
|
57
|
|
|
public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) |
|
58
|
|
|
{ |
|
59
|
|
|
$this->saveFields($submittedData, $task); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* Fields validation. |
|
65
|
|
|
* This method checks if page id given in the 'Hide content' specific task is int+ |
|
66
|
|
|
* If the task class is not relevant, the method is expected to return true |
|
67
|
|
|
* |
|
68
|
|
|
* @param array $submittedData Reference to the array containing the data submitted by the user |
|
69
|
|
|
* @param tx_scheduler_Module $parentObject Reference to the calling object (Scheduler's BE module) |
|
70
|
|
|
* @return boolean True if validation was ok (or selected class is not relevant), false otherwise |
|
71
|
|
|
*/ |
|
72
|
|
|
public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) |
|
73
|
|
|
{ |
|
74
|
|
|
try { |
|
75
|
|
|
return $this->validateFields($submittedData, $parentObject); |
|
76
|
|
|
} catch(\Exception $e) { |
|
77
|
|
|
$this->addMessage($e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
return false; |
|
81
|
|
|
} |
|
82
|
|
|
} |
|
83
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths