modules/admin/controllers/CmsPageController.php
/**
     * Creates a new CmsPage model.
     * If creation is successful, the browser will be redirected to the 'index' page.
     * @return mixed
     */
Creates a new CmsPage model.
If creation is successful, the browser will be redirected to the 'index' page.
@return mixed
Creates a new CmsPage model . If creation is successful the browser will be redirected to the ' index ' page . @return mixed
public function actionCreate()
    {
        $model = new CmsPage();
        if ($model->load(Yii::$app->request->post())) {
            if ($model->save()) {
                Yii::$app->session->setFlash(Growl::TYPE_SUCCESS, "Content created successfully.");
            } else {
                Yii::$app->session->setFlash(Growl::TYPE_DANGER, "Error while creating Content.");
            }
            return $this->redirect(['index']);
        }
        return $this->render('create', [
            'model' => $model,
        ]);
    }
public function actionCreate ( ) { $ model = new CmsPage ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { if ( $ model -> save ( ) ) { Yii :: $ app -> session -> setFlash ( Growl :: TYPE_SUCCESS , " Content created successfully. " ) ; } else { Yii :: $ app -> session -> setFlash ( Growl :: TYPE_DANGER , " Error while creating Content. " ) ; } return $ this -> redirect ( [ 'index' ] ) ; } return $ this -> render ( 'create' , [ 'model' => $ model , ] ) ; }
Creates a new CmsPage model.
Creates a new CmsPage model .