protected function afterSave() { parent::afterSave(); if ($this->isNewRecord) { Object::saveMetaValue('price', $this->price, $this, true); } else { Object::saveMetaValue('price', $this->price, $this, false); } }
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); } }