function actionOverride($id_class, $id_method) { $meth = $this->loadMethod($id_method); $class = $this->loadModel($id_class); if (!$meth->virtual && !$meth->override) { throw new CHttpException(400, 'Method is not virtual'); } $over = new Method(); $over->attributes = $meth->attributes; $over->virtual = 0; $over->abstract = 0; $over->override = 1; $over->id_class = $class->id_class; $over->save(false); foreach ($meth->arguments as $arg) { $n_arg = new Argument(); $n_arg->attributes = $arg->attributes; $n_arg->id_method = $over->id_method; $n_arg->save(false); } $this->redirect(array('view', 'id' => $id_class)); }