Пример #1
0
 private function _createTrackingPage($formName, $templateName)
 {
     $trackingPageName = 'form-' . $formName . '-thank-you';
     $trackingName = 'Form ' . $formName . ' Thank you';
     $trackingPageUrl = $this->_helper->page->filterUrl($trackingPageName);
     $pageMapper = Application_Model_Mappers_PageMapper::getInstance();
     $pageModel = new Application_Model_Models_Page();
     $trackingPageExist = $pageMapper->findByUrl($trackingPageUrl);
     if (empty($trackingPageExist)) {
         $pageModel->setParentId(-1);
         $pageModel->setDraft(0);
         $pageModel->setTemplateId($templateName);
         $pageModel->setH1($trackingName);
         $pageModel->setHeaderTitle($trackingName);
         $pageModel->setMetaDescription($trackingName);
         $pageModel->setNavName($trackingName);
         $pageModel->setUrl($trackingPageUrl);
         $pageModel->setSystem(0);
         $pageMapper->save($pageModel);
     }
     return $trackingPageUrl;
 }