afterSave() 보호된 메소드

protected afterSave ( )
예제 #1
0
 protected function afterSave()
 {
     parent::afterSave();
     if ($this->isNewRecord) {
         Object::saveMetaValue('price', $this->price, $this, true);
     } else {
         Object::saveMetaValue('price', $this->price, $this, false);
     }
 }
예제 #2
0
 protected function afterSave()
 {
     parent::afterSave();
     if ($this->isNewRecord) {
         Object::saveMetaValue('start_date', $this->start_date, $this, true);
         Object::saveMetaValue('end_date', $this->end_date, $this, true);
     } else {
         Object::saveMetaValue('start_date', $this->start_date, $this, false);
         Object::saveMetaValue('end_date', $this->end_date, $this, false);
     }
 }