2 namespace TYPO3\CMS\Scheduler\Task;
44 throw new \InvalidArgumentException(
'Task not of type FileStorageExtractionTask', 1384275695);
46 $additionalFields[
'scheduler_fileStorageIndexing_storage'] = $this->getAllStoragesField($task);
47 $additionalFields[
'scheduler_fileStorageIndexing_fileCount'] = $this->
getFileCountField($task);
48 $additionalFields[
'scheduler_fileStorageIndexing_registeredExtractors'] = $this->getRegisteredExtractorsField($task);
49 return $additionalFields;
63 foreach ($storages as $storage) {
64 if ($task !== null && $task->storageUid === $storage->getUid()) {
65 $options[] =
'<option value="' . $storage->getUid() .
'" selected="selected">' . $storage->getName() .
'</option>';
67 $options[] =
'<option value="' . $storage->getUid() .
'">' . $storage->getName() .
'</option>';
71 $fieldName =
'tx_scheduler[scheduler_fileStorageIndexing_storage]';
72 $fieldId =
'scheduler_fileStorageIndexing_storage';
73 $fieldHtml =
'<select class="form-control" name="' . $fieldName .
'" id="' . $fieldId .
'">' . implode(
"\n", $options) .
'</select>';
75 $fieldConfiguration = array(
77 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageIndexing.storage',
78 'cshKey' =>
'_MOD_system_txschedulerM1',
79 'cshLabel' => $fieldId
81 return $fieldConfiguration;
92 $fieldName =
'tx_scheduler[scheduler_fileStorageIndexing_fileCount]';
93 $fieldId =
'scheduler_fileStorageIndexing_fileCount';
94 $fieldValue = $task !== null ? (int)$task->maxFileCount : 100;
95 $fieldHtml =
'<input type="text" class="form-control" name="' . $fieldName .
'" id="' . $fieldId .
'" value="' . htmlspecialchars($fieldValue) .
'">';
97 $fieldConfiguration = array(
99 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.fileCount',
100 'cshKey' =>
'_MOD_system_txschedulerM1',
101 'cshLabel' => $fieldId
103 return $fieldConfiguration;
116 if (empty($extractors)) {
117 $labelKey =
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors.without_extractors';
125 $content = $flashMessage->render();
128 $labelKey =
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors.extractor';
130 foreach ($extractors as $extractor) {
131 $bullets[] = sprintf(
132 '<li title="%s">%s</li>',
133 get_class($extractor),
139 $labelKey =
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors.with_extractors';
143 '<ul>' . implode(LF, $bullets) .
'</ul>',
147 $content = $flashMessage->render();
150 $fieldConfiguration = array(
152 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors',
153 'cshKey' =>
'_MOD_system_txschedulerM1',
154 'cshLabel' =>
'scheduler_fileStorageIndexing_registeredExtractors'
156 return $fieldConfiguration;
192 throw new \InvalidArgumentException(
'Task not of type FileStorageExtractionTask', 1384275698);
194 $task->storageUid = (int)$submittedData[
'scheduler_fileStorageIndexing_storage'];
195 $task->maxFileCount = (int)$submittedData[
'scheduler_fileStorageIndexing_fileCount'];
207 $extractorParts = explode(
'\\', get_class($extractor));
208 return array_pop($extractorParts);