コード例 #1
0
 public function saveNavigation($signal, Centurion_Db_Table_Row_Abstract $sender)
 {
     $navigationTable = Centurion_Db::getSingleton('core/navigation');
     if ($sender->proxy !== null && $sender->proxy instanceof CMS_FLATPAGE_ROW) {
         $sender->proxy->is_published = $sender->is_visible;
         $sender->setReadOnly(false);
         $sender->proxy->save();
     }
 }
コード例 #2
0
ファイル: Abstract.php プロジェクト: rom1git/Centurion
 /**
  * @param null|array $values
  * @return Centurion_Db_Table_Row_Abstract|null
  */
 public function saveInstance($values = null)
 {
     if ($values === null) {
         $values = $this->getValues();
     }
     $values = $this->_saveReferenceSubForms($this->_processValues($values));
     if (!$this->hasInstance()) {
         $this->_isNew = true;
         $this->_instance = $this->getModel()->createRow();
     } else {
         $this->_instance->setReadOnly(false);
     }
     $this->_instance->setFromArray($values);
     $this->_preSave();
     Centurion_Signal::factory('pre_save')->send($this);
     $this->_instance->save();
     $this->_saveManyDependentTables();
     $this->_postSave($this->_isNew);
     Centurion_Signal::factory('post_save')->send($this);
     return $this->_instance;
 }