|
@@ 936-947 (lines=12) @@
|
| 933 |
|
* @return Filter\FilterSelect |
| 934 |
|
* @throws DataGridException |
| 935 |
|
*/ |
| 936 |
|
public function addFilterSelect($key, $name, array $options, $column = NULL) |
| 937 |
|
{ |
| 938 |
|
$column = $column ?: $key; |
| 939 |
|
|
| 940 |
|
if (!is_string($column)) { |
| 941 |
|
throw new DataGridException("Filter Select can only filter through one column."); |
| 942 |
|
} |
| 943 |
|
|
| 944 |
|
$this->addFilterCheck($key); |
| 945 |
|
|
| 946 |
|
return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
| 947 |
|
} |
| 948 |
|
|
| 949 |
|
|
| 950 |
|
/** |
|
@@ 980-991 (lines=12) @@
|
| 977 |
|
* @return Filter\FilterRange |
| 978 |
|
* @throws DataGridException |
| 979 |
|
*/ |
| 980 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 981 |
|
{ |
| 982 |
|
$column = $column ?: $key; |
| 983 |
|
|
| 984 |
|
if (!is_string($column)) { |
| 985 |
|
throw new DataGridException("FilterRange can only filter through one column."); |
| 986 |
|
} |
| 987 |
|
|
| 988 |
|
$this->addFilterCheck($key); |
| 989 |
|
|
| 990 |
|
return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
| 991 |
|
} |
| 992 |
|
|
| 993 |
|
|
| 994 |
|
/** |
|
@@ 1002-1013 (lines=12) @@
|
| 999 |
|
* @return Filter\FilterDateRange |
| 1000 |
|
* @throws DataGridException |
| 1001 |
|
*/ |
| 1002 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 1003 |
|
{ |
| 1004 |
|
$column = $column ?: $key; |
| 1005 |
|
|
| 1006 |
|
if (!is_string($column)) { |
| 1007 |
|
throw new DataGridException("FilterDateRange can only filter through one column."); |
| 1008 |
|
} |
| 1009 |
|
|
| 1010 |
|
$this->addFilterCheck($key); |
| 1011 |
|
|
| 1012 |
|
return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
| 1013 |
|
} |
| 1014 |
|
|
| 1015 |
|
|
| 1016 |
|
/** |