2 namespace TYPO3\CMS\Scheduler\Task;
34 throw new \InvalidArgumentException(
'Task not of type FileStorageExtractionTask', 1384275696);
36 $additionalFields[
'scheduler_fileStorageIndexing_storage'] = $this->getAllStoragesField($task);
37 return $additionalFields;
49 $storages = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\StorageRepository::class)->findAll();
51 foreach ($storages as $storage) {
52 if ($task != null && $task->storageUid === $storage->getUid()) {
53 $options[] =
'<option value="' . $storage->getUid() .
'" selected="selected">' . $storage->getName() .
'</option>';
55 $options[] =
'<option value="' . $storage->getUid() .
'">' . $storage->getName() .
'</option>';
59 $fieldName =
'tx_scheduler[scheduler_fileStorageIndexing_storage]';
60 $fieldId =
'scheduler_fileStorageIndexing_storage';
61 $fieldHtml =
'<select class="form-control" name="' . $fieldName .
'" id="' . $fieldId .
'">' . implode(
"\n", $options) .
'</select>';
63 $fieldConfiguration = array(
65 'label' =>
'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.fileStorageIndexing.storage',
66 'cshKey' =>
'_MOD_system_txschedulerM1',
67 'cshLabel' => $fieldId
69 return $fieldConfiguration;
81 $value = $submittedData[
'scheduler_fileStorageIndexing_storage'];
101 throw new \InvalidArgumentException(
'Task not of type FileStorageExtractionTask', 1384275697);
103 $task->storageUid = (int)$submittedData[
'scheduler_fileStorageIndexing_storage'];