|
@@ 1180-1191 (lines=12) @@
|
| 1177 |
|
* @return Filter\FilterSelect |
| 1178 |
|
* @throws DataGridException |
| 1179 |
|
*/ |
| 1180 |
|
public function addFilterSelect($key, $name, array $options, $column = NULL) |
| 1181 |
|
{ |
| 1182 |
|
$column = $column ?: $key; |
| 1183 |
|
|
| 1184 |
|
if (!is_string($column)) { |
| 1185 |
|
throw new DataGridException("Filter Select can only filter in one column."); |
| 1186 |
|
} |
| 1187 |
|
|
| 1188 |
|
$this->addFilterCheck($key); |
| 1189 |
|
|
| 1190 |
|
return $this->filters[$key] = new Filter\FilterSelect($this, $key, $name, $options, $column); |
| 1191 |
|
} |
| 1192 |
|
|
| 1193 |
|
|
| 1194 |
|
/** |
|
@@ 1203-1214 (lines=12) @@
|
| 1200 |
|
* @return Filter\FilterSelect |
| 1201 |
|
* @throws DataGridException |
| 1202 |
|
*/ |
| 1203 |
|
public function addFilterMultiSelect($key, $name, array $options, $column = NULL) |
| 1204 |
|
{ |
| 1205 |
|
$column = $column ?: $key; |
| 1206 |
|
|
| 1207 |
|
if (!is_string($column)) { |
| 1208 |
|
throw new DataGridException("Filter MultiSelect can only filter in one column."); |
| 1209 |
|
} |
| 1210 |
|
|
| 1211 |
|
$this->addFilterCheck($key); |
| 1212 |
|
|
| 1213 |
|
return $this->filters[$key] = new Filter\FilterMultiSelect($this, $key, $name, $options, $column); |
| 1214 |
|
} |
| 1215 |
|
|
| 1216 |
|
|
| 1217 |
|
/** |
|
@@ 1225-1236 (lines=12) @@
|
| 1222 |
|
* @return Filter\FilterDate |
| 1223 |
|
* @throws DataGridException |
| 1224 |
|
*/ |
| 1225 |
|
public function addFilterDate($key, $name, $column = NULL) |
| 1226 |
|
{ |
| 1227 |
|
$column = $column ?: $key; |
| 1228 |
|
|
| 1229 |
|
if (!is_string($column)) { |
| 1230 |
|
throw new DataGridException("FilterDate can only filter in one column."); |
| 1231 |
|
} |
| 1232 |
|
|
| 1233 |
|
$this->addFilterCheck($key); |
| 1234 |
|
|
| 1235 |
|
return $this->filters[$key] = new Filter\FilterDate($this, $key, $name, $column); |
| 1236 |
|
} |
| 1237 |
|
|
| 1238 |
|
|
| 1239 |
|
/** |
|
@@ 1247-1258 (lines=12) @@
|
| 1244 |
|
* @return Filter\FilterRange |
| 1245 |
|
* @throws DataGridException |
| 1246 |
|
*/ |
| 1247 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 1248 |
|
{ |
| 1249 |
|
$column = $column ?: $key; |
| 1250 |
|
|
| 1251 |
|
if (!is_string($column)) { |
| 1252 |
|
throw new DataGridException("FilterRange can only filter in one column."); |
| 1253 |
|
} |
| 1254 |
|
|
| 1255 |
|
$this->addFilterCheck($key); |
| 1256 |
|
|
| 1257 |
|
return $this->filters[$key] = new Filter\FilterRange($this, $key, $name, $column, $name_second); |
| 1258 |
|
} |
| 1259 |
|
|
| 1260 |
|
|
| 1261 |
|
/** |
|
@@ 1269-1280 (lines=12) @@
|
| 1266 |
|
* @return Filter\FilterDateRange |
| 1267 |
|
* @throws DataGridException |
| 1268 |
|
*/ |
| 1269 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 1270 |
|
{ |
| 1271 |
|
$column = $column ?: $key; |
| 1272 |
|
|
| 1273 |
|
if (!is_string($column)) { |
| 1274 |
|
throw new DataGridException("FilterDateRange can only filter in one column."); |
| 1275 |
|
} |
| 1276 |
|
|
| 1277 |
|
$this->addFilterCheck($key); |
| 1278 |
|
|
| 1279 |
|
return $this->filters[$key] = new Filter\FilterDateRange($this, $key, $name, $column, $name_second); |
| 1280 |
|
} |
| 1281 |
|
|
| 1282 |
|
|
| 1283 |
|
/** |