public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject)
    {
        $editCommand = version_compare(TYPO3_branch, '9.5', '>=')
            ? $parentObject->getCurrentAction() === Action::EDIT
            : $parentObject->CMD === 'edit';

        // Initialize selected fields
        if (!isset($taskInfo['scheduler_batchResize_directories'])) {
            $taskInfo['scheduler_batchResize_directories'] = $this->defaultDirectories;
            if ($editCommand) {
                /** @var $task \Causal\ImageAutoresize\Task\BatchResizeTask */
                $taskInfo['scheduler_batchResize_directories'] = $task->directories;
            }
        }
        if (!isset($taskInfo['scheduler_batchResize_excludeDirectories'])) {
            $taskInfo['scheduler_batchResize_excludeDirectories'] = $this->defaultExcludeDirectories;
            if ($editCommand) {
                /** @var $task \Causal\ImageAutoresize\Task\BatchResizeTask */
                $taskInfo['scheduler_batchResize_excludeDirectories'] = $task->excludeDirectories;
            }
        }

        // Create HTML form fields
        $additionalFields = [];

        // Directories to be processed
        $fieldName = 'tx_scheduler[scheduler_batchResize_directories]';
        $fieldId = 'scheduler_batchResize_directories';
        $fieldValue = trim($taskInfo['scheduler_batchResize_directories']);
        $fieldHtml = '<textarea class="form-control" rows="4" name="' . $fieldName . '" id="' . $fieldId . '">' . htmlspecialchars($fieldValue) . '</textarea>';
        $additionalFields[$fieldId] = [
            'code' => $fieldHtml,
            'label' => 'LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:label.batchResize.directories',
        ];

        // Directories to be excluded
        $fieldName = 'tx_scheduler[scheduler_batchResize_excludeDirectories]';
        $fieldId = 'scheduler_batchResize_excludeDirectories';
        $fieldValue = trim($taskInfo['scheduler_batchResize_excludeDirectories']);
        $fieldHtml = '<textarea class="form-control" rows="4" name="' . $fieldName . '" id="' . $fieldId . '">' . htmlspecialchars($fieldValue) . '</textarea>';
        $additionalFields[$fieldId] = [
            'code' => $fieldHtml,
            'label' => 'LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:label.batchResize.excludeDirectories',
        ];

        return $additionalFields;
    }
public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject)
    {
        $editCommand = version_compare(TYPO3_branch, '9.5', '>=')
            ? $parentObject->getCurrentAction() === Action::EDIT
            : $parentObject->CMD === 'edit';

        // Initialize selected fields
        if (!isset($taskInfo['scheduler_batchResize_directories'])) {
            $taskInfo['scheduler_batchResize_directories'] = $this->defaultDirectories;
            if ($editCommand) {
                /** @var $task \Causal\ImageAutoresize\Task\BatchResizeTask */
                $taskInfo['scheduler_batchResize_directories'] = $task->directories;
            }
        }
        if (!isset($taskInfo['scheduler_batchResize_excludeDirectories'])) {
            $taskInfo['scheduler_batchResize_excludeDirectories'] = $this->defaultExcludeDirectories;
            if ($editCommand) {
                /** @var $task \Causal\ImageAutoresize\Task\BatchResizeTask */
                $taskInfo['scheduler_batchResize_excludeDirectories'] = $task->excludeDirectories;
            }
        }

        // Create HTML form fields
        $additionalFields = [];

        // Directories to be processed
        $fieldName = 'tx_scheduler[scheduler_batchResize_directories]';
        $fieldId = 'scheduler_batchResize_directories';
        $fieldValue = trim($taskInfo['scheduler_batchResize_directories']);
        $fieldHtml = '<textarea class="form-control" rows="4" name="' . $fieldName . '" id="' . $fieldId . '">' . htmlspecialchars($fieldValue) . '</textarea>';
        $additionalFields[$fieldId] = [
            'code' => $fieldHtml,
            'label' => 'LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:label.batchResize.directories',
        ];

        // Directories to be excluded
        $fieldName = 'tx_scheduler[scheduler_batchResize_excludeDirectories]';
        $fieldId = 'scheduler_batchResize_excludeDirectories';
        $fieldValue = trim($taskInfo['scheduler_batchResize_excludeDirectories']);
        $fieldHtml = '<textarea class="form-control" rows="4" name="' . $fieldName . '" id="' . $fieldId . '">' . htmlspecialchars($fieldValue) . '</textarea>';
        $additionalFields[$fieldId] = [
            'code' => $fieldHtml,
            'label' => 'LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:label.batchResize.excludeDirectories',
        ];

        return $additionalFields;
    }
public function getAdditionalFields ( array & $ taskInfo , $ task , \ TYPO3 \ CMS \ Scheduler \ Controller \ SchedulerModuleController $ parentObject ) { $ editCommand = version_compare ( TYPO3_branch , '9.5' , '>=' ) ? $ parentObject -> getCurrentAction ( ) === Action :: EDIT : $ parentObject -> CMD === 'edit' ; // Initialize selected fields if ( ! isset ( $ taskInfo [ 'scheduler_batchResize_directories' ] ) ) { $ taskInfo [ 'scheduler_batchResize_directories' ] = $ this -> defaultDirectories ; if ( $ editCommand ) { /** @var $task \Causal\ImageAutoresize\Task\BatchResizeTask */ $ taskInfo [ 'scheduler_batchResize_directories' ] = $ task -> directories ; } } if ( ! isset ( $ taskInfo [ 'scheduler_batchResize_excludeDirectories' ] ) ) { $ taskInfo [ 'scheduler_batchResize_excludeDirectories' ] = $ this -> defaultExcludeDirectories ; if ( $ editCommand ) { /** @var $task \Causal\ImageAutoresize\Task\BatchResizeTask */ $ taskInfo [ 'scheduler_batchResize_excludeDirectories' ] = $ task -> excludeDirectories ; } } // Create HTML form fields $ additionalFields = [ ] ; // Directories to be processed $ fieldName = 'tx_scheduler[scheduler_batchResize_directories]' ; $ fieldId = 'scheduler_batchResize_directories' ; $ fieldValue = trim ( $ taskInfo [ 'scheduler_batchResize_directories' ] ) ; $ fieldHtml = '<textarea class="form-control" rows="4" name="' . $ fieldName . '" id="' . $ fieldId . '">' . htmlspecialchars ( $ fieldValue ) . '</textarea>' ; $ additionalFields [ $ fieldId ] = [ 'code' => $ fieldHtml , 'label' => 'LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:label.batchResize.directories' , ] ; // Directories to be excluded $ fieldName = 'tx_scheduler[scheduler_batchResize_excludeDirectories]' ; $ fieldId = 'scheduler_batchResize_excludeDirectories' ; $ fieldValue = trim ( $ taskInfo [ 'scheduler_batchResize_excludeDirectories' ] ) ; $ fieldHtml = '<textarea class="form-control" rows="4" name="' . $ fieldName . '" id="' . $ fieldId . '">' . htmlspecialchars ( $ fieldValue ) . '</textarea>' ; $ additionalFields [ $ fieldId ] = [ 'code' => $ fieldHtml , 'label' => 'LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:label.batchResize.excludeDirectories' , ] ; return $ additionalFields ; }
Adds text area input fields for choosing directories to be processed and excluding directories.

@param array $taskInfo Reference to the array containing the info used in the add/edit form
@param object $task When editing, reference to the current task object. Null when adding.
@param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject Reference to the calling object (Scheduler's BE module)
@return array Array containing all the information pertaining to the additional fields
Adds text area input fields for choosing directories to be processed and excluding directories .