@@ 1074-1085 (lines=12) @@ | ||
1071 | * @return Filter\FilterSelect |
|
1072 | * @throws DataGridException |
|
1073 | */ |
|
1074 | public function addFilterSelect($key, $name, array $options, $column = NULL) |
|
1075 | { |
|
1076 | $column = $column ?: $key; |
|
1077 | ||
1078 | if (!is_string($column)) { |
|
1079 | throw new DataGridException("Filter Select can only filter in one column."); |
|
1080 | } |
|
1081 | ||
1082 | $this->addFilterCheck($key); |
|
1083 | ||
1084 | return $this->filters[$key] = new Filter\FilterSelect($this, $key, $name, $options, $column); |
|
1085 | } |
|
1086 | ||
1087 | ||
1088 | /** |
|
@@ 1097-1108 (lines=12) @@ | ||
1094 | * @return Filter\FilterSelect |
|
1095 | * @throws DataGridException |
|
1096 | */ |
|
1097 | public function addFilterMultiSelect($key, $name, array $options, $column = NULL) |
|
1098 | { |
|
1099 | $column = $column ?: $key; |
|
1100 | ||
1101 | if (!is_string($column)) { |
|
1102 | throw new DataGridException("Filter MultiSelect can only filter in one column."); |
|
1103 | } |
|
1104 | ||
1105 | $this->addFilterCheck($key); |
|
1106 | ||
1107 | return $this->filters[$key] = new Filter\FilterMultiSelect($this, $key, $name, $options, $column); |
|
1108 | } |
|
1109 | ||
1110 | ||
1111 | /** |
|
@@ 1119-1130 (lines=12) @@ | ||
1116 | * @return Filter\FilterDate |
|
1117 | * @throws DataGridException |
|
1118 | */ |
|
1119 | public function addFilterDate($key, $name, $column = NULL) |
|
1120 | { |
|
1121 | $column = $column ?: $key; |
|
1122 | ||
1123 | if (!is_string($column)) { |
|
1124 | throw new DataGridException("FilterDate can only filter in one column."); |
|
1125 | } |
|
1126 | ||
1127 | $this->addFilterCheck($key); |
|
1128 | ||
1129 | return $this->filters[$key] = new Filter\FilterDate($this, $key, $name, $column); |
|
1130 | } |
|
1131 | ||
1132 | ||
1133 | /** |
|
@@ 1141-1152 (lines=12) @@ | ||
1138 | * @return Filter\FilterRange |
|
1139 | * @throws DataGridException |
|
1140 | */ |
|
1141 | public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
|
1142 | { |
|
1143 | $column = $column ?: $key; |
|
1144 | ||
1145 | if (!is_string($column)) { |
|
1146 | throw new DataGridException("FilterRange can only filter in one column."); |
|
1147 | } |
|
1148 | ||
1149 | $this->addFilterCheck($key); |
|
1150 | ||
1151 | return $this->filters[$key] = new Filter\FilterRange($this, $key, $name, $column, $name_second); |
|
1152 | } |
|
1153 | ||
1154 | ||
1155 | /** |
|
@@ 1163-1174 (lines=12) @@ | ||
1160 | * @return Filter\FilterDateRange |
|
1161 | * @throws DataGridException |
|
1162 | */ |
|
1163 | public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
|
1164 | { |
|
1165 | $column = $column ?: $key; |
|
1166 | ||
1167 | if (!is_string($column)) { |
|
1168 | throw new DataGridException("FilterDateRange can only filter in one column."); |
|
1169 | } |
|
1170 | ||
1171 | $this->addFilterCheck($key); |
|
1172 | ||
1173 | return $this->filters[$key] = new Filter\FilterDateRange($this, $key, $name, $column, $name_second); |
|
1174 | } |
|
1175 | ||
1176 | ||
1177 | /** |