controllers/SiteController.php
/**
     * Displays contact page.
     *
     * @return string
     */
Displays contact page.
@return string
Displays contact page . @return string
public function actionContacts()
    {
        $page = Page::viewPage(7);
        $model = new ContactForm();
        if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['toEmail'])) {
            Yii::$app->session->setFlash('contactFormSubmitted');
            return $this->redirect(Url::current(['#' => 'feedback']));
        }
        return $this->render('contacts', [
            'page' => $page,
            'model' => $model,
        ]);
    }
public function actionContacts ( ) { $ page = Page :: viewPage ( 7 ) ; $ model = new ContactForm ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> contact ( Yii :: $ app -> params [ 'toEmail' ] ) ) { Yii :: $ app -> session -> setFlash ( 'contactFormSubmitted' ) ; return $ this -> redirect ( Url :: current ( [ '#' => 'feedback' ] ) ) ; } return $ this -> render ( 'contacts' , [ 'page' => $ page , 'model' => $ model , ] ) ; }
Displays contact page.
Displays contact page .