public function run()
 {
     $searchModel = new PropertySearch();
     $params = Yii::$app->request->queryParams;
     if ($this->client && empty($params['PropertySearch'])) {
         $params['PropertySearch']['client_id'] = $this->client->id;
     }
     $dataProvider = $searchModel->search($params);
     $model = new Property();
     return $this->render('property_to_client', ['module' => yii::$app->getModule('service'), 'model' => $model, 'client' => $this->client, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 public function actionIndex()
 {
     $searchModel = PropertySearch::find()->all();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'module' => $this->module]);
 }