コード例 #1
0
 /**
  * Finds the Messagebox model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Messagebox the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Messagebox::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
コード例 #2
0
ファイル: WapxController.php プロジェクト: noikiy/wowewe
 public function actionMessageboxdetail()
 {
     $this->layout = false;
     $gh_id = U::getSessionParam('gh_id');
     $openid = U::getSessionParam('openid');
     Yii::$app->wx->setGhId($gh_id);
     $gh = Yii::$app->wx->getGh();
     $msg_id = $_GET['msg_id'];
     $messagebox = Messagebox::findOne(['msg_id' => $msg_id]);
     return $this->render('messageboxdetail', ['gh_id' => $gh_id, 'openid' => $openid, 'messagebox' => $messagebox]);
 }