Пример #1
0
 public function actionExport()
 {
     $model = new Provider();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_POST['Provider'])) {
         $model->attributes = $_POST['Provider'];
     }
     $exportType = $_POST['fileType'];
     $this->widget('ext.heart.export.EHeartExport', array('title' => 'List of Provider', 'dataProvider' => $model->search(), 'filter' => $model, 'grid_mode' => 'export', 'exportType' => $exportType, 'columns' => array('provider_id', 'name')));
 }
Пример #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $model = new Provider('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Provider'])) {
         $model->attributes = $_GET['Provider'];
     }
     $this->render('admin', array('model' => $model));
 }