/** * Deletes a particular model. * If deletion is successful, the browser will be redirected to the 'admin' page. * @param integer $id the ID of the model to be deleted */ public function actionDelete() { if ($this->id > 0) { $item = ExBanner::fetch($this->id); if ($item->id > 0) { $item->delete(); $this->redirect(SiteHelper::createUrl("/console/banners")); } } $this->redirect(SiteHelper::createUrl("/console/banners")); }