public function actionUpdate($id) { $model = new AttributeGroupForm(); if (isset($_POST['AttributeGroupForm'])) { $model->attributes = $_POST['AttributeGroupForm']; if ($model->validate()) { $model->save(); $this->redirect(array('index')); } } else { $model->loadDataFromAttributeGroup($id); } $groups = CHtml::listData(AttributeGroupDescription::model()->findAll(), 'attribute_group_id', 'name'); $this->render('update', array('model' => $model, 'groups' => $groups)); }
public function afterDelete() { // delete dependencies AttributeGroupDescription::model()->deleteAll("attribute_group_id={$this->cacheId}"); parent::afterDelete(); }