Exemplo n.º 1
0
 public function actionGetStarted($id)
 {
     $curUser = Customer::model()->findByPk($id);
     if (empty($curUser->id)) {
         throw new CHttpException(403, 'Customer Does\'t exists');
     }
     // saving current customer to session
     Yii::app()->session['last_created_user'] = $curUser->attributes;
     $getStarted = AppContent::model()->findAll();
     $this->render('getStarted', array('getStarted' => $getStarted));
 }
 public function actionGetStarted($id)
 {
     unset(Yii::app()->session['menus']);
     $curUser = Customer::model()->findByPk($id);
     if (empty($curUser->id)) {
         throw new CHttpException(403, 'Customer Does\'t exists');
     }
     // saving current customer to session
     Yii::app()->session['last_created_user'] = $curUser->attributes;
     $bannerImg = Banner::model()->findByAttributes(array('isactive' => 1, 'loc' => 2));
     $getStarted = AppContent::model()->findAll();
     $this->render('getStarted', array('getStarted' => $getStarted, 'customer' => $curUser, 'bannerImg' => $bannerImg));
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return AppContent the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = AppContent::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }