/** * Used to define fields to provide the Solr server address when adding * or editing a task. * * @param array $taskInfo: reference to the array containing the info used in the add/edit form * @param tx_scheduler_Task $task: when editing, reference to the current task object. Null when adding. * @param tx_scheduler_module1 $schedulerModule: reference to the calling object (Scheduler's BE module) * @return array Array containg all the information pertaining to the additional fields * The array is multidimensional, keyed to the task class name and each field's id * For each field it provides an associative sub-array with the following: */ public function getAdditionalFields(array &$taskInfo, $task, tx_scheduler_Module $schedulerModule) { $this->initialize($taskInfo, $task, $schedulerModule); $additionalFields = array(); $additionalFields['site'] = array('code' => Tx_Solr_Site::getAvailableSitesSelector('tx_scheduler[site]', $this->site), 'label' => 'LLL:EXT:solr/Resources/Private/Language/ModuleScheduler.xml:field_site', 'cshKey' => '', 'cshLabel' => ''); $additionalFields['indexingConfigurations'] = array('code' => $this->getIndexingConfigurationSelector(), 'label' => 'Index Queue configurations to re-index', 'cshKey' => '', 'cshLabel' => ''); return $additionalFields; }
/** * Used to define fields to provide the TYPO3 site to index and number of * items to index per run when adding or editing a task. * * @param array $taskInfo: reference to the array containing the info used in the add/edit form * @param tx_scheduler_Task $task: when editing, reference to the current task object. Null when adding. * @param tx_scheduler_module1 $schedulerModule: reference to the calling object (Scheduler's BE module) * @return array Array containg all the information pertaining to the additional fields * The array is multidimensional, keyed to the task class name and each field's id * For each field it provides an associative sub-array with the following: */ public function getAdditionalFields(array &$taskInfo, $task, tx_scheduler_Module $schedulerModule) { $additionalFields = array(); if ($schedulerModule->CMD == 'add') { $taskInfo['site'] = NULL; $taskInfo['documentsToIndexLimit'] = 50; } if ($schedulerModule->CMD == 'edit') { $taskInfo['site'] = $task->getSite(); $taskInfo['documentsToIndexLimit'] = $task->getDocumentsToIndexLimit(); } $additionalFields['site'] = array('code' => Tx_Solr_Site::getAvailableSitesSelector('tx_scheduler[site]', $taskInfo['site']), 'label' => 'LLL:EXT:solr/Resources/Private/Language/ModuleScheduler.xml:field_site', 'cshKey' => '', 'cshLabel' => ''); $additionalFields['documentsToIndexLimit'] = array('code' => '<input type="text" name="tx_scheduler[documentsToIndexLimit]" value="' . htmlspecialchars($taskInfo['documentsToIndexLimit']) . '" />', 'label' => 'LLL:EXT:solr/Resources/Private/Language/ModuleScheduler.xml:indexqueueworker_field_documentsToIndexLimit', 'cshKey' => '', 'cshLabel' => ''); return $additionalFields; }