Exemplo n.º 1
0
 public function actionList()
 {
     $InsuranceSearchForm = new InsuranceSearchForm();
     if (isset($_POST['InsuranceSearchForm'])) {
         $InsuranceSearchForm->setAttributes($_POST['InsuranceSearchForm'], false);
         $InsuranceSearchForm->validate();
         if (isset($_POST['autosearch'])) {
             $InsuranceSearchForm->saveAutosearch('Insurance');
         }
     }
     $criteria = $InsuranceSearchForm->getCriteria();
     $criteria->order = 'insurance_id DESC';
     $this->render('list', ['Insurance' => Insurance::model()->findAll($criteria), 'InsuranceSearchForm' => $InsuranceSearchForm]);
 }