Example #1
0
 protected function _getCleanPage()
 {
     if (isset($this->_cleanPage)) {
         return $this->_cleanPage;
     }
     $this->_cleanPage = new Clean_Cms_Model_Cms_Page();
     $this->_cleanPage->setData($this->getPage()->getData());
     return $this->_cleanPage;
 }
Example #2
0
 /**
  * @return Clean_Cms_Model_Cms_Page
  */
 public function currentCmsPage()
 {
     $page = Mage::registry('cms_page');
     if (!$page || !$page instanceof Mage_Cms_Model_Page) {
         return new Clean_Cms_Model_Cms_Page();
     }
     $cleanPage = new Clean_Cms_Model_Cms_Page();
     $cleanPage->setData($page->getData());
     return $cleanPage;
 }
Example #3
0
 /**
  * @param $page Mage_Cms_Model_Page
  */
 protected function _saveCleanCmsData($page)
 {
     $params = Mage::app()->getRequest()->getParam('cleancms');
     $cleanPage = new Clean_Cms_Model_Cms_Page();
     $cleanPage->setData($page->getData());
     if (!$params) {
         return $this;
     }
     $cleanPage->saveFields($params);
     if (isset($_FILES['cleancms'])) {
         $cleanPage->saveFiles($_FILES['cleancms']);
     }
     return $this;
 }