diff --git a/Classes/Command/ImportCommand.php b/Classes/Command/ImportCommand.php new file mode 100644 index 0000000..004a73b --- /dev/null +++ b/Classes/Command/ImportCommand.php @@ -0,0 +1,43 @@ +addArgument( + 'pid', + InputArgument::REQUIRED, + 'Parent ID' + ); + $this + ->addArgument( + 'csv', + InputArgument::REQUIRED, + 'CSV File Path' + ); + } + /** + * Initializes the command after the input has been bound and before the input is validated. + * + * @see InputInterface::input() + * @see InputInterface::output() + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + //Code Goes Here + return COMMAND::SUCCESS; + } + +} diff --git a/Classes/Controller/ProductAreaController.php b/Classes/Controller/ProductAreaController.php old mode 100644 new mode 100755 diff --git a/Classes/Domain/Model/ProductArea.php b/Classes/Domain/Model/ProductArea.php old mode 100644 new mode 100755 diff --git a/Classes/Domain/Repository/ProductAreaRepository.php b/Classes/Domain/Repository/ProductAreaRepository.php old mode 100644 new mode 100755 diff --git a/Classes/Task/NsT3devField.php b/Classes/Task/NsT3devField.php new file mode 100755 index 0000000..1d0e21c --- /dev/null +++ b/Classes/Task/NsT3devField.php @@ -0,0 +1,77 @@ +getCurrentAction() == 'add') { + $taskInfo['csvpath'] = ''; + } else { + $taskInfo['csvpath'] = $task->csvpath; + } + } + + if (empty($taskInfo['pid'])) { + if ($parentObject->getCurrentAction() == 'add') { + $taskInfo['pid'] = ''; + } else { + $taskInfo['pid'] = (int)$task->pid; + } + } + + // Inputfields + $additionalFields = [ + + 'task_pid' => [ + 'code' => '', + 'label' => transalte::translate('scheduler.pid', 'ns_t3dev'), + ], + 'task_csvpath' => [ + 'code' => '', + 'label' => transalte::translate('scheduler.csvpath', 'ns_t3dev'), + ], + + ]; + + return $additionalFields; + } + + /** + * Validates the input value(s) + * @param array $submittedData + * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject + * @return bool + */ + public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) + { + // Validation Codes Goes Here + return true; + } + + /** + * Saves the input value + * @param array $submittedData + * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task + */ + public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) + { + $task->csvpath = trim($submittedData['csvpath']); + $task->pid = trim((int)$submittedData['pid']); + } +} diff --git a/Classes/Task/Task.php b/Classes/Task/Task.php new file mode 100755 index 0000000..ba0c367 --- /dev/null +++ b/Classes/Task/Task.php @@ -0,0 +1,21 @@ + Slug + + CSV File Path + + + Parent ID + diff --git a/Resources/Private/Language/locallang_csh_tx_nst3dev_domain_model_productarea.xlf b/Resources/Private/Language/locallang_csh_tx_nst3dev_domain_model_productarea.xlf old mode 100644 new mode 100755 diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf old mode 100644 new mode 100755 diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Partials/FormErrors.html b/Resources/Private/Partials/FormErrors.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Partials/ProductArea/FormFields.html b/Resources/Private/Partials/ProductArea/FormFields.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Partials/ProductArea/Properties.html b/Resources/Private/Partials/ProductArea/Properties.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Templates/ProductArea/Edit.html b/Resources/Private/Templates/ProductArea/Edit.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Templates/ProductArea/List.html b/Resources/Private/Templates/ProductArea/List.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Templates/ProductArea/New.html b/Resources/Private/Templates/ProductArea/New.html old mode 100644 new mode 100755 diff --git a/Resources/Private/Templates/ProductArea/Show.html b/Resources/Private/Templates/ProductArea/Show.html old mode 100644 new mode 100755 diff --git a/Resources/Public/Icons/ext_domain product.png b/Resources/Public/Icons/ext_domain product.png old mode 100644 new mode 100755 diff --git a/Tests/Functional/BasicTest.php b/Tests/Functional/BasicTest.php old mode 100644 new mode 100755 diff --git a/Tests/Unit/Controller/ProductAreaControllerTest.php b/Tests/Unit/Controller/ProductAreaControllerTest.php old mode 100644 new mode 100755 diff --git a/Tests/Unit/Domain/Model/ProductAreaTest.php b/Tests/Unit/Domain/Model/ProductAreaTest.php old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/config/sites/t3-dev/config.yaml b/config/sites/t3-dev/config.yaml old mode 100644 new mode 100755 diff --git a/ext_emconf.php b/ext_emconf.php old mode 100644 new mode 100755 diff --git a/ext_icon.svg b/ext_icon.svg old mode 100644 new mode 100755 diff --git a/ext_localconf.php b/ext_localconf.php old mode 100644 new mode 100755 diff --git a/ext_tables.php b/ext_tables.php old mode 100644 new mode 100755 index 2cbfaad..932492f --- a/ext_tables.php +++ b/ext_tables.php @@ -5,3 +5,10 @@ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_nst3dev_domain_model_productarea', 'EXT:ns_t3dev/Resources/Private/Language/locallang_csh_tx_nst3dev_domain_model_productarea.xlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_nst3dev_domain_model_productarea'); })(); + +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['NITSAN\\NsT3dev\\Task\\Task'] = [ + 'extension' => 'ns_t3dev', + 'title' => 'Schedular for Import Data from CSV File to Page Table', + 'description' => 'Setup scheduler which can be not updated on given time line ', + 'additionalFields' => 'NITSAN\\NsT3dev\\Task\\NsT3devField', +]; \ No newline at end of file diff --git a/ext_tables.sql b/ext_tables.sql old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/phive.xml b/phive.xml old mode 100644 new mode 100755 diff --git a/phpcs.xml b/phpcs.xml old mode 100644 new mode 100755 diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon old mode 100644 new mode 100755 diff --git a/phpstan.neon b/phpstan.neon old mode 100644 new mode 100755 diff --git a/stylelint.config.js b/stylelint.config.js old mode 100644 new mode 100755 diff --git a/username.csv b/username.csv new file mode 100755 index 0000000..3f74ef9 --- /dev/null +++ b/username.csv @@ -0,0 +1,4 @@ +Title; SubTitle; +test1;subtest1 +test2;subtest2 +test3;subtest3