original_string: public function actionViewReceived($id = null)
      {
          $model = MessageReceiver::find()->where([
                  'and',
                  ['id' => $id, 'receiver_id' => User::loggedId()],
                  ['!=', 'receiver_status', MessageReceiver::STATUS_DELETED]
              ])->limit(1)->one();
          if (empty($model)) {
              $this->error(Yii::t('podium/flash', 'Sorry! We can not find the message with the given ID.'));
              return $this->redirect(['messages/inbox']);
          }
          $model->markRead();
          return $this->render('view', [
              'model' => $model->message,
              'type' => 'received',
              'id' => $model->id
          ]);
      }
code: public function actionViewReceived($id = null)
      {
          $model = MessageReceiver::find()->where([
                  'and',
                  ['id' => $id, 'receiver_id' => User::loggedId()],
                  ['!=', 'receiver_status', MessageReceiver::STATUS_DELETED]
              ])->limit(1)->one();
          if (empty($model)) {
              $this->error(Yii::t('podium/flash', 'Sorry! We can not find the message with the given ID.'));
              return $this->redirect(['messages/inbox']);
          }
          $model->markRead();
          return $this->render('view', [
              'model' => $model->message,
              'type' => 'received',
              'id' => $model->id
          ]);
      }
code_tokens: public function actionViewReceived ( $ id = null ) { $ model = MessageReceiver :: find ( ) -> where ( [ 'and' , [ 'id' => $ id , 'receiver_id' => User :: loggedId ( ) ] , [ '!=' , 'receiver_status' , MessageReceiver :: STATUS_DELETED ] ] ) -> limit ( 1 ) -> one ( ) ; if ( empty ( $ model ) ) { $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! We can not find the message with the given ID.' ) ) ; return $ this -> redirect ( [ 'messages/inbox' ] ) ; } $ model -> markRead ( ) ; return $ this -> render ( 'view' , [ 'model' => $ model -> message , 'type' => 'received' , 'id' => $ model -> id ] ) ; }
docstring: Viewing the received message of given ID.
  @param int $id
  @return string|Response
docstring_tokens: Viewing the received message of given ID .