|
@@ 1047-1058 (lines=12) @@
|
| 1044 |
|
* @return Filter\FilterSelect |
| 1045 |
|
* @throws DataGridException |
| 1046 |
|
*/ |
| 1047 |
|
public function addFilterSelect($key, $name, array $options, $column = NULL) |
| 1048 |
|
{ |
| 1049 |
|
$column = $column ?: $key; |
| 1050 |
|
|
| 1051 |
|
if (!is_string($column)) { |
| 1052 |
|
throw new DataGridException("Filter Select can only filter in one column."); |
| 1053 |
|
} |
| 1054 |
|
|
| 1055 |
|
$this->addFilterCheck($key); |
| 1056 |
|
|
| 1057 |
|
return $this->filters[$key] = new Filter\FilterSelect($this, $key, $name, $options, $column); |
| 1058 |
|
} |
| 1059 |
|
|
| 1060 |
|
|
| 1061 |
|
/** |
|
@@ 1070-1081 (lines=12) @@
|
| 1067 |
|
* @return Filter\FilterSelect |
| 1068 |
|
* @throws DataGridException |
| 1069 |
|
*/ |
| 1070 |
|
public function addFilterMultiSelect($key, $name, array $options, $column = NULL) |
| 1071 |
|
{ |
| 1072 |
|
$column = $column ?: $key; |
| 1073 |
|
|
| 1074 |
|
if (!is_string($column)) { |
| 1075 |
|
throw new DataGridException("Filter MultiSelect can only filter in one column."); |
| 1076 |
|
} |
| 1077 |
|
|
| 1078 |
|
$this->addFilterCheck($key); |
| 1079 |
|
|
| 1080 |
|
return $this->filters[$key] = new Filter\FilterMultiSelect($this, $key, $name, $options, $column); |
| 1081 |
|
} |
| 1082 |
|
|
| 1083 |
|
|
| 1084 |
|
/** |
|
@@ 1092-1103 (lines=12) @@
|
| 1089 |
|
* @return Filter\FilterDate |
| 1090 |
|
* @throws DataGridException |
| 1091 |
|
*/ |
| 1092 |
|
public function addFilterDate($key, $name, $column = NULL) |
| 1093 |
|
{ |
| 1094 |
|
$column = $column ?: $key; |
| 1095 |
|
|
| 1096 |
|
if (!is_string($column)) { |
| 1097 |
|
throw new DataGridException("FilterDate can only filter in one column."); |
| 1098 |
|
} |
| 1099 |
|
|
| 1100 |
|
$this->addFilterCheck($key); |
| 1101 |
|
|
| 1102 |
|
return $this->filters[$key] = new Filter\FilterDate($this, $key, $name, $column); |
| 1103 |
|
} |
| 1104 |
|
|
| 1105 |
|
|
| 1106 |
|
/** |
|
@@ 1114-1125 (lines=12) @@
|
| 1111 |
|
* @return Filter\FilterRange |
| 1112 |
|
* @throws DataGridException |
| 1113 |
|
*/ |
| 1114 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 1115 |
|
{ |
| 1116 |
|
$column = $column ?: $key; |
| 1117 |
|
|
| 1118 |
|
if (!is_string($column)) { |
| 1119 |
|
throw new DataGridException("FilterRange can only filter in one column."); |
| 1120 |
|
} |
| 1121 |
|
|
| 1122 |
|
$this->addFilterCheck($key); |
| 1123 |
|
|
| 1124 |
|
return $this->filters[$key] = new Filter\FilterRange($this, $key, $name, $column, $name_second); |
| 1125 |
|
} |
| 1126 |
|
|
| 1127 |
|
|
| 1128 |
|
/** |
|
@@ 1136-1147 (lines=12) @@
|
| 1133 |
|
* @return Filter\FilterDateRange |
| 1134 |
|
* @throws DataGridException |
| 1135 |
|
*/ |
| 1136 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 1137 |
|
{ |
| 1138 |
|
$column = $column ?: $key; |
| 1139 |
|
|
| 1140 |
|
if (!is_string($column)) { |
| 1141 |
|
throw new DataGridException("FilterDateRange can only filter in one column."); |
| 1142 |
|
} |
| 1143 |
|
|
| 1144 |
|
$this->addFilterCheck($key); |
| 1145 |
|
|
| 1146 |
|
return $this->filters[$key] = new Filter\FilterDateRange($this, $key, $name, $column, $name_second); |
| 1147 |
|
} |
| 1148 |
|
|
| 1149 |
|
|
| 1150 |
|
/** |