/** * Finds the Bids model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param string $id * @return Bids the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Bids::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
$icon = '<i class="fa fa-trophy fa-lg"></i>'; $color = '#00aff0;'; $pre = ''; $log_text = Yii::t('app', 'successfully closed') . $suff . ' <a href="' . Url::to('order/' . $log->alias . '') . '">' . Yii::t('app', 'the request') . ' <i class="fa fa-file"></i> #' . $log->alias . '</a>'; } // if ($log->action=='order_successful') // provider_selected if ($log->action == 'provider_selected') { $icon = '<i class="fa fa-trophy fa-lg"></i>'; $color = 'purple'; $pre = ''; $log_text = Yii::t('app', 'selected') . $suff . ' <a href="' . Url::to('provider/' . $user1->username . '/i') . '"><i class="fa fa-user"></i> ' . Yii::t('app', 'a service provider') . '</a> ' . Yii::t('app', 'for the request') . ' #<a href="' . Url::to('order/' . $log->alias2 . '') . '">' . $log->alias2 . '</a>'; } // if ($log->action=='provider_selected') if ($log->alias != null) { $bid = \common\models\Bids::findOne($log->alias); // bid_sent if ($log->action == 'bid_sent') { $icon = '<i class="fa fa-check-square fa-lg"></i>'; $color = '#00cc00;'; $pre = ''; $log_text = Yii::t('app', 'sent') . $suff . ' <a href="' . Url::to('order/' . $bid->order_id . '') . '">' . Yii::t('app', 'a bid') . ' <i class="fa fa-share-square-o"></i> #' . $log->alias . '</a>'; } // if ($log->action=='bid_sent') // bid_updated if ($log->action == 'bid_updated') { $icon = '<i class="fa fa-edit fa-lg"></i>'; $color = '#00cc00;'; $pre = ''; $log_text = Yii::t('app', 'updated') . $suff . ' <a href="' . Url::to('order/' . $bid->order_id . '') . '">' . Yii::t('app', 'the bid') . ' <i class="fa fa-share-square-o"></i> #' . $log->alias . '</a>'; }