/** * Creates a new model * If creation is successful, the browser will be redirected to the 'view' page */ public function actionCreate() { $model = new CatalogCategory(); $this->breadcrumbs['Управление услугами'] = array('/services'); $this->breadcrumbs[] = 'Добавление категории'; if (isset($_POST['CatalogCategory'])) { $model->attributes = $_POST['CatalogCategory']; if ($model->save()) { $this->redirect(array('index')); } } $this->render('create', array('model' => $model)); }