예제 #1
0
 /**
  * Gets additional fields to render in the form to add/edit a task
  *
  * @param array $taskInfo Values of the fields from the add/edit task form
  * @param \TYPO3\CMS\Recycler\Task\CleanerTask $task The task object being edited. NULL when adding a task!
  * @param SchedulerModuleController $schedulerModule Reference to the scheduler backend module
  * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
  */
 public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
 {
     if ($schedulerModule->CMD === 'edit') {
         $taskInfo['RecyclerCleanerTCA'] = $task->getTcaTables();
         $taskInfo['RecyclerCleanerPeriod'] = $task->getPeriod();
     }
     $additionalFields['period'] = ['code' => '<input type="text" class="form-control" name="tx_scheduler[RecyclerCleanerPeriod]" value="' . $taskInfo['RecyclerCleanerPeriod'] . '">', 'label' => 'LLL:EXT:recycler/Resources/Private/Language/locallang_tasks.xlf:cleanerTaskPeriod', 'cshKey' => '', 'cshLabel' => 'task_recyclerCleaner_selectedPeriod'];
     $additionalFields['tca'] = ['code' => $this->getTcaSelectHtml($taskInfo['RecyclerCleanerTCA']), 'label' => 'LLL:EXT:recycler/Resources/Private/Language/locallang_tasks.xlf:cleanerTaskTCA', 'cshKey' => '', 'cshLabel' => 'task_recyclerCleaner_selectedTables'];
     return $additionalFields;
 }
예제 #2
0
 /**
  * @test
  */
 public function getPeriodCanBeSet()
 {
     $period = 14;
     $this->subject->setPeriod($period);
     $this->assertEquals($period, $this->subject->getPeriod());
 }