|
@@ 920-931 (lines=12) @@
|
| 917 |
|
* @return Filter\FilterSelect |
| 918 |
|
* @throws DataGridException |
| 919 |
|
*/ |
| 920 |
|
public function addFilterSelect($key, $name, array $options, $column = NULL) |
| 921 |
|
{ |
| 922 |
|
$column = $column ?: $key; |
| 923 |
|
|
| 924 |
|
if (!is_string($column)) { |
| 925 |
|
throw new DataGridException("Filter Select can only filter through one column."); |
| 926 |
|
} |
| 927 |
|
|
| 928 |
|
$this->addFilterCheck($key); |
| 929 |
|
|
| 930 |
|
return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
| 931 |
|
} |
| 932 |
|
|
| 933 |
|
|
| 934 |
|
/** |
|
@@ 964-975 (lines=12) @@
|
| 961 |
|
* @return Filter\FilterRange |
| 962 |
|
* @throws DataGridException |
| 963 |
|
*/ |
| 964 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 965 |
|
{ |
| 966 |
|
$column = $column ?: $key; |
| 967 |
|
|
| 968 |
|
if (!is_string($column)) { |
| 969 |
|
throw new DataGridException("FilterRange can only filter through one column."); |
| 970 |
|
} |
| 971 |
|
|
| 972 |
|
$this->addFilterCheck($key); |
| 973 |
|
|
| 974 |
|
return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
| 975 |
|
} |
| 976 |
|
|
| 977 |
|
|
| 978 |
|
/** |
|
@@ 986-997 (lines=12) @@
|
| 983 |
|
* @return Filter\FilterDateRange |
| 984 |
|
* @throws DataGridException |
| 985 |
|
*/ |
| 986 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 987 |
|
{ |
| 988 |
|
$column = $column ?: $key; |
| 989 |
|
|
| 990 |
|
if (!is_string($column)) { |
| 991 |
|
throw new DataGridException("FilterDateRange can only filter through one column."); |
| 992 |
|
} |
| 993 |
|
|
| 994 |
|
$this->addFilterCheck($key); |
| 995 |
|
|
| 996 |
|
return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
| 997 |
|
} |
| 998 |
|
|
| 999 |
|
|
| 1000 |
|
/** |