@@ 1003-1014 (lines=12) @@ | ||
1000 | * @return Filter\FilterSelect |
|
1001 | * @throws DataGridException |
|
1002 | */ |
|
1003 | public function addFilterSelect($key, $name, array $options, $column = NULL) |
|
1004 | { |
|
1005 | $column = $column ?: $key; |
|
1006 | ||
1007 | if (!is_string($column)) { |
|
1008 | throw new DataGridException("Filter Select can only filter in one column."); |
|
1009 | } |
|
1010 | ||
1011 | $this->addFilterCheck($key); |
|
1012 | ||
1013 | return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
|
1014 | } |
|
1015 | ||
1016 | ||
1017 | /** |
|
@@ 1070-1081 (lines=12) @@ | ||
1067 | * @return Filter\FilterRange |
|
1068 | * @throws DataGridException |
|
1069 | */ |
|
1070 | public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
|
1071 | { |
|
1072 | $column = $column ?: $key; |
|
1073 | ||
1074 | if (!is_string($column)) { |
|
1075 | throw new DataGridException("FilterRange can only filter in one column."); |
|
1076 | } |
|
1077 | ||
1078 | $this->addFilterCheck($key); |
|
1079 | ||
1080 | return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
|
1081 | } |
|
1082 | ||
1083 | ||
1084 | /** |
|
@@ 1092-1103 (lines=12) @@ | ||
1089 | * @return Filter\FilterDateRange |
|
1090 | * @throws DataGridException |
|
1091 | */ |
|
1092 | public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
|
1093 | { |
|
1094 | $column = $column ?: $key; |
|
1095 | ||
1096 | if (!is_string($column)) { |
|
1097 | throw new DataGridException("FilterDateRange can only filter in one column."); |
|
1098 | } |
|
1099 | ||
1100 | $this->addFilterCheck($key); |
|
1101 | ||
1102 | return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
|
1103 | } |
|
1104 | ||
1105 | ||
1106 | /** |