|
@@ 899-910 (lines=12) @@
|
| 896 |
|
* @return Filter\FilterSelect |
| 897 |
|
* @throws DataGridException |
| 898 |
|
*/ |
| 899 |
|
public function addFilterSelect($key, $name, $options, $column = NULL) |
| 900 |
|
{ |
| 901 |
|
$column = $column ?: $key; |
| 902 |
|
|
| 903 |
|
if (!is_string($column)) { |
| 904 |
|
throw new DataGridException("Filter Select can only filter through one column."); |
| 905 |
|
} |
| 906 |
|
|
| 907 |
|
$this->addFilterCheck($key); |
| 908 |
|
|
| 909 |
|
return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
| 910 |
|
} |
| 911 |
|
|
| 912 |
|
|
| 913 |
|
/** |
|
@@ 943-954 (lines=12) @@
|
| 940 |
|
* @return Filter\FilterRange |
| 941 |
|
* @throws DataGridException |
| 942 |
|
*/ |
| 943 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 944 |
|
{ |
| 945 |
|
$column = $column ?: $key; |
| 946 |
|
|
| 947 |
|
if (!is_string($column)) { |
| 948 |
|
throw new DataGridException("FilterRange can only filter through one column."); |
| 949 |
|
} |
| 950 |
|
|
| 951 |
|
$this->addFilterCheck($key); |
| 952 |
|
|
| 953 |
|
return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
| 954 |
|
} |
| 955 |
|
|
| 956 |
|
|
| 957 |
|
/** |
|
@@ 965-976 (lines=12) @@
|
| 962 |
|
* @return Filter\FilterDateRange |
| 963 |
|
* @throws DataGridException |
| 964 |
|
*/ |
| 965 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 966 |
|
{ |
| 967 |
|
$column = $column ?: $key; |
| 968 |
|
|
| 969 |
|
if (!is_string($column)) { |
| 970 |
|
throw new DataGridException("FilterDateRange can only filter through one column."); |
| 971 |
|
} |
| 972 |
|
|
| 973 |
|
$this->addFilterCheck($key); |
| 974 |
|
|
| 975 |
|
return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
| 976 |
|
} |
| 977 |
|
|
| 978 |
|
|
| 979 |
|
/** |