Exemplo n.º 1
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $model = new Press('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Press'])) {
         $model->attributes = $_GET['Press'];
     }
     $this->render('index', array('model' => $model));
 }
Exemplo n.º 2
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));
 }