コード例 #1
0
ファイル: ErrorLogController.php プロジェクト: withlovee/HAII
 /**
  * Initial data for error_log filter
  * string    $status     status of problem ("all", "marked", "unmarked")
  * @param $data_type
  * @return array
  */
 protected function dataForForm($status, $data_type)
 {
     $params = Input::all();
     $data = $this->getSelectedValues($params);
     $data['basins'] = TeleStation::basins(true);
     $data['parts'] = TeleStation::parts(true);
     $data['provinces'] = TeleStation::provinces(true);
     $data['codes'] = TeleStation::codes(true);
     $data['marked'] = '';
     $data['unmarked'] = '';
     $data['start_date'] = '';
     $data['start_time'] = '';
     $data['all'] = '';
     $data['water'] = '';
     $data['rain'] = '';
     $data[$status] = 'active';
     $data[$data_type] = 'active';
     $data['data_type'] = $data_type;
     $data['url_status'] = $status;
     if ($status == 'marked') {
         $data['status'] = 'true';
     } elseif ($status == 'all') {
         $data['status'] = 'all';
     } else {
         $data['status'] = 'false';
     }
     return $data;
 }