controllers/TemplateController.php
/**
     * @param string $alias
     * @return MailTemplate the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
@param string $alias
@return MailTemplate the loaded model
@throws NotFoundHttpException if the model cannot be found
@param string $alias @return MailTemplate the loaded model @throws NotFoundHttpException if the model cannot be found
protected function findModel(string $alias)
    {
        $model = MailTemplate::find()
            ->andWhere(['=', 'alias', $alias])
            ->one();
        if ($model) {
            return $model;
        }
        throw new NotFoundHttpException('The requested page does not exist.');
    }
protected function findModel ( string $ alias ) { $ model = MailTemplate :: find ( ) -> andWhere ( [ '=' , 'alias' , $ alias ] ) -> one ( ) ; if ( $ model ) { return $ model ; } throw new NotFoundHttpException ( 'The requested page does not exist.' ) ; }
@param string $alias
 @return MailTemplate the loaded model
 @throws NotFoundHttpException if the model cannot be found
@param string $alias @return MailTemplate the loaded model @throws NotFoundHttpException if the model cannot be found