public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); if ($insert) { $this->mailAdmin(); } }
public function afterSave($insert, $attributes) { parent::afterSave($insert, $attributes); $this->parseData(); ItemData::deleteAll(['item_id' => $this->primaryKey]); foreach ($this->data as $name => $value) { if (!is_array($value)) { $this->insertDataValue($name, $value); } else { foreach ($value as $arrayItem) { $this->insertDataValue($name, $arrayItem); } } } }
public function afterSave($insert, $attributes) { parent::afterSave($insert, $attributes); $this->parseItems(); }