public function actionNew_Objects() {

        $this->pageTitle = 'Новые объекты';
        $this->active_link = 'new_objects';

        $model = new Objects('search');
        $model->unsetAttributes();  // clear any default values

        if(!empty($_GET['Objects']))
            $model->attributes = $_GET['Objects'];

        $additionalCriteria = new CDbCriteria;
        $additionalCriteria->condition = 't.verified = false';

        $dataProvider = $model->search(array(),$additionalCriteria);
         
        $this->render('index',array(
            'model'=>$model, 'dataProvider'=>$dataProvider
        ));
    }
Beispiel #2
0
 /**
  * Tests search in regex mode with value.
  */
 public function testSearchRegEx()
 {
     $objects = new Objects(array(1, '1'));
     $this->assertSame(array(0, 1), $objects->search('/[0-9]/', IObjects::REGEX_SEARCH_MODE));
 }