@@ 956-967 (lines=12) @@ | ||
953 | * @return Filter\FilterSelect |
|
954 | * @throws DataGridException |
|
955 | */ |
|
956 | public function addFilterSelect($key, $name, array $options, $column = NULL) |
|
957 | { |
|
958 | $column = $column ?: $key; |
|
959 | ||
960 | if (!is_string($column)) { |
|
961 | throw new DataGridException("Filter Select can only filter in one column."); |
|
962 | } |
|
963 | ||
964 | $this->addFilterCheck($key); |
|
965 | ||
966 | return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
|
967 | } |
|
968 | ||
969 | ||
970 | /** |
|
@@ 1023-1034 (lines=12) @@ | ||
1020 | * @return Filter\FilterRange |
|
1021 | * @throws DataGridException |
|
1022 | */ |
|
1023 | public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
|
1024 | { |
|
1025 | $column = $column ?: $key; |
|
1026 | ||
1027 | if (!is_string($column)) { |
|
1028 | throw new DataGridException("FilterRange can only filter in one column."); |
|
1029 | } |
|
1030 | ||
1031 | $this->addFilterCheck($key); |
|
1032 | ||
1033 | return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
|
1034 | } |
|
1035 | ||
1036 | ||
1037 | /** |
|
@@ 1045-1056 (lines=12) @@ | ||
1042 | * @return Filter\FilterDateRange |
|
1043 | * @throws DataGridException |
|
1044 | */ |
|
1045 | public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
|
1046 | { |
|
1047 | $column = $column ?: $key; |
|
1048 | ||
1049 | if (!is_string($column)) { |
|
1050 | throw new DataGridException("FilterDateRange can only filter in one column."); |
|
1051 | } |
|
1052 | ||
1053 | $this->addFilterCheck($key); |
|
1054 | ||
1055 | return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
|
1056 | } |
|
1057 | ||
1058 | ||
1059 | /** |