Exemplo n.º 1
0
 /**
  * Before Save
  *
  * @param array $options
  * @return boolean
  * @access public
  */
 public function beforeSave($options = array())
 {
     $this->_saveTemplateFiles();
     // does not save to the database, so doesn't come back to this beforeSave()
     $this->data = $this->_cleanData($this->data);
     //Need to get the old template id before we overwrite it
     if (!empty($this->data['Webpage']['template_id']) && isset($this->data['Webpage']['id'])) {
         $this->_oldTemplateId = $this->field('template_id', array('id' => $this->data['Webpage']['id']));
     }
     return parent::beforeSave($options);
 }
Exemplo n.º 2
0
 /**
  * Before save callback
  * 
  */
 public function beforeSave($options = array())
 {
     $this->data = $this->_cleanData($this->data);
     return parent::beforeSave($options);
 }