/** * preneseni commit success z formu na validatory */ public function commitProcessSuccess() { try { foreach ($this->validators as $validator) { $validator->commitProcessSuccess(); } // uchovat hodnotu pro pripadnou persistenci $_SESSION["LBox"]["Forms"][$this->form->getName()]["Controls"][$this->getName()]["value"][LBoxFront::getPage()->url] = $this->getValue(); } catch (Exception $e) { throw $e; } }
/** * prida form do indexace k aktualni URL * @param LBoxForm $form */ public function addFormUsed(LBoxForm $form) { try { if ($this->listeningOff) { return; } $url = substr(LBOX_REQUEST_URL, -1) == "/" ? LBOX_REQUEST_URL : LBOX_REQUEST_URL . "/"; $url = str_replace("?/", "/", $url); $url = str_replace("//", "/", $url); if (LBoxFront::getPage()->config->id != LBoxConfigSystem::getInstance()->getParamByPath("pages/page404")) { $this->recordTypes[$url]["forms"][$form->getName()] = $form->getName(); $this->recordTypes[$url]["pageid"] = LBoxFront::getPage()->config->id; } } catch (Exception $e) { throw $e; } }
/** * vraci formularova data konkretniho kroku podle predaneho formu * @param LBoxForm $form * @return array */ public function getFormsDataStepByForm(LBoxForm $form) { try { $step = NULL; foreach ($this->subForms as $stepSubform => $subForm) { if ($form->getName() == $subForm->getName()) { $step = $stepSubform; } } if (!is_int($step)) { throw new LBoxExceptionForm(LBoxExceptionForm::MSG_FORM_FORM_SUB_NOT_SET, LBoxExceptionForm::CODE_FORM_FORM_SUB_NOT_SET); } $formsData = $this->getFormsData(); return $formsData[$step]; } catch (Exception $e) { throw $e; } }