Пример #1
0
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     $this->breadcrumbs = array('Новости' => array('/press'));
     $model = new Press('search');
     $model->attachBehavior('dateComparator', array('class' => 'DateComparator'));
     $model->unsetAttributes();
     // clear any default values
     // set attributes from get
     if (isset($_GET['Press'])) {
         $model->attributes = $_GET['Press'];
     }
     $this->render('list', array('model' => $model));
 }