43 throw new \InvalidArgumentException(
'Task not of type FileStorageExtractionTask', 1384275695);
46 $additionalFields[
'scheduler_fileStorageIndexing_fileCount'] = $this->
getFileCountField($task);
48 return $additionalFields;
60 $storages = GeneralUtility::makeInstance(\
TYPO3\CMS\Core\Resource\StorageRepository::class)->findAll();
62 foreach ($storages as $storage) {
63 if ($task !==
null && $task->storageUid === $storage->getUid()) {
64 $options[] =
'<option value="' . $storage->getUid() .
'" selected="selected">' . $storage->getName() .
'</option>';
66 $options[] =
'<option value="' . $storage->getUid() .
'">' . $storage->getName() .
'</option>';
70 $fieldName =
'tx_scheduler[scheduler_fileStorageIndexing_storage]';
71 $fieldId =
'scheduler_fileStorageIndexing_storage';
72 $fieldHtml =
'<select class="form-control" name="' . $fieldName .
'" id="' . $fieldId .
'">' . implode(
"\n", $options) .
'</select>';
74 $fieldConfiguration = [
76 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageIndexing.storage',
77 'cshKey' =>
'_MOD_system_txschedulerM1',
78 'cshLabel' => $fieldId
80 return $fieldConfiguration;
91 $fieldName =
'tx_scheduler[scheduler_fileStorageIndexing_fileCount]';
92 $fieldId =
'scheduler_fileStorageIndexing_fileCount';
93 $fieldValue = $task !==
null ? (int)$task->maxFileCount : 100;
94 $fieldHtml =
'<input type="text" class="form-control" name="' . $fieldName .
'" id="' . $fieldId .
'" value="' . htmlspecialchars($fieldValue) .
'">';
96 $fieldConfiguration = [
98 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.fileCount',
99 'cshKey' =>
'_MOD_system_txschedulerM1',
100 'cshLabel' => $fieldId
102 return $fieldConfiguration;
115 if (empty($extractors)) {
116 $labelKey =
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors.without_extractors';
117 $content =
'<span class="label label-warning">'
122 $labelKey =
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors.extractor';
124 foreach ($extractors as $extractor) {
125 $bullets[] = sprintf(
126 '<li title="%s">%s</li>',
127 get_class($extractor),
133 $labelKey =
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors.with_extractors';
135 $content =
'<p>' . htmlspecialchars($title) .
'</p>';
136 $content .=
'<ul>' . implode(LF, $bullets) .
'</ul>';
139 $fieldConfiguration = [
141 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageExtraction.registeredExtractors',
142 'cshKey' =>
'_MOD_system_txschedulerM1',
143 'cshLabel' =>
'scheduler_fileStorageIndexing_registeredExtractors'
145 return $fieldConfiguration;
182 throw new \InvalidArgumentException(
'Task not of type FileStorageExtractionTask', 1384275698);
184 $task->storageUid = (int)$submittedData[
'scheduler_fileStorageIndexing_storage'];
185 $task->maxFileCount = (int)$submittedData[
'scheduler_fileStorageIndexing_fileCount'];
197 $extractorParts = explode(
'\\', get_class($extractor));
198 return array_pop($extractorParts);