Exemplo n.º 1
0
 public $userID;
 public function init()
 {
     parent::init();
     $this->userID = Yii::app()->user->id;
 }
 public function actionIndex()
 {
     $this->pageTitle = 'Companys Listing' . ' - ' . Yii::app()->params['title'];
     $model = new Listing();
Exemplo n.º 2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Listing('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Listing'])) {
         $model->attributes = $_GET['Listing'];
     }
     $this->render('admin', array('model' => $model));
 }
Exemplo n.º 3
0
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     try {
         $model = new Listing('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Listing'])) {
             $model->attributes = $_GET['Listing'];
         }
         $this->render('index', array('model' => $model, 'actions' => $this->listActionsCanAccess));
     } catch (Exception $e) {
         Yii::log("Exception " . print_r($e, true), 'error');
         throw new CHttpException("Exception " . print_r($e, true));
     }
 }