public function actionCreate($value = '') { $algorithm = new Algorithms(); $algorithm->steps = "[{}]"; if (isset($_REQUEST['Algorithms'])) { $algorithm->title = $_REQUEST['Algorithms']['title']; $algorithm->description = $_REQUEST['Algorithms']['description']; $algorithm->steps = $_REQUEST['Algorithms']['steps']; if ($algorithm->save()) { Yii::app()->notify->add("Алгоритм создан"); $this->redirect(array('/algorithms/' . $algorithm->id . '/edit')); } } $this->render('edit', array("algorithm" => $algorithm)); }