afterSave() protected method

protected afterSave ( )
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }