/** * Fields validation. * This method checks if page id given in the 'Hide content' specific task is int+ * If the task class is not relevant, the method is expected to return true * * @param array $submittedData Reference to the array containing the data submitted by the user * @param tx_scheduler_Module $parentObject Reference to the calling object (Scheduler's BE module) * @return boolean True if validation was ok (or selected class is not relevant), false otherwise */ protected function validateFields(array &$submittedData, $parentObject) { if (count((array) $submittedData[$this->fieldController]) < 1) { throw new \Exception($GLOBALS['LANG']->sL('LLL:EXT:aimeos/Resources/Private/Language/Scheduler.xml:default.error.controller.missing')); } if (count((array) $submittedData[$this->fieldSite]) < 1) { throw new \Exception($GLOBALS['LANG']->sL('LLL:EXT:aimeos/Resources/Private/Language/Scheduler.xml:default.error.sitecode.missing')); } Base::parseTS($submittedData[$this->fieldTSconfig]); $context = Scheduler\Base::getContext(); $siteItems = Scheduler\Base::getSiteItems($context, $submittedData[$this->fieldSite]); if (count($siteItems) !== count($submittedData[$this->fieldSite])) { throw new \Exception($GLOBALS['LANG']->sL('LLL:EXT:aimeos/Resources/Private/Language/Scheduler.xml:default.error.sitecode')); } $aimeos = Base::getAimeos(); $cntlPaths = $aimeos->getCustomPaths('controller/jobs'); foreach ((array) $submittedData[$this->fieldController] as $name) { \Controller_Jobs_Factory::createController($context, $aimeos, $name); } return true; }