|
@@ 1059-1070 (lines=12) @@
|
| 1056 |
|
* @return Filter\FilterSelect |
| 1057 |
|
* @throws DataGridException |
| 1058 |
|
*/ |
| 1059 |
|
public function addFilterSelect($key, $name, array $options, $column = NULL) |
| 1060 |
|
{ |
| 1061 |
|
$column = $column ?: $key; |
| 1062 |
|
|
| 1063 |
|
if (!is_string($column)) { |
| 1064 |
|
throw new DataGridException("Filter Select can only filter in one column."); |
| 1065 |
|
} |
| 1066 |
|
|
| 1067 |
|
$this->addFilterCheck($key); |
| 1068 |
|
|
| 1069 |
|
return $this->filters[$key] = new Filter\FilterSelect($this, $key, $name, $options, $column); |
| 1070 |
|
} |
| 1071 |
|
|
| 1072 |
|
|
| 1073 |
|
/** |
|
@@ 1082-1093 (lines=12) @@
|
| 1079 |
|
* @return Filter\FilterSelect |
| 1080 |
|
* @throws DataGridException |
| 1081 |
|
*/ |
| 1082 |
|
public function addFilterMultiSelect($key, $name, array $options, $column = NULL) |
| 1083 |
|
{ |
| 1084 |
|
$column = $column ?: $key; |
| 1085 |
|
|
| 1086 |
|
if (!is_string($column)) { |
| 1087 |
|
throw new DataGridException("Filter MultiSelect can only filter in one column."); |
| 1088 |
|
} |
| 1089 |
|
|
| 1090 |
|
$this->addFilterCheck($key); |
| 1091 |
|
|
| 1092 |
|
return $this->filters[$key] = new Filter\FilterMultiSelect($this, $key, $name, $options, $column); |
| 1093 |
|
} |
| 1094 |
|
|
| 1095 |
|
|
| 1096 |
|
/** |
|
@@ 1104-1115 (lines=12) @@
|
| 1101 |
|
* @return Filter\FilterDate |
| 1102 |
|
* @throws DataGridException |
| 1103 |
|
*/ |
| 1104 |
|
public function addFilterDate($key, $name, $column = NULL) |
| 1105 |
|
{ |
| 1106 |
|
$column = $column ?: $key; |
| 1107 |
|
|
| 1108 |
|
if (!is_string($column)) { |
| 1109 |
|
throw new DataGridException("FilterDate can only filter in one column."); |
| 1110 |
|
} |
| 1111 |
|
|
| 1112 |
|
$this->addFilterCheck($key); |
| 1113 |
|
|
| 1114 |
|
return $this->filters[$key] = new Filter\FilterDate($this, $key, $name, $column); |
| 1115 |
|
} |
| 1116 |
|
|
| 1117 |
|
|
| 1118 |
|
/** |
|
@@ 1126-1137 (lines=12) @@
|
| 1123 |
|
* @return Filter\FilterRange |
| 1124 |
|
* @throws DataGridException |
| 1125 |
|
*/ |
| 1126 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 1127 |
|
{ |
| 1128 |
|
$column = $column ?: $key; |
| 1129 |
|
|
| 1130 |
|
if (!is_string($column)) { |
| 1131 |
|
throw new DataGridException("FilterRange can only filter in one column."); |
| 1132 |
|
} |
| 1133 |
|
|
| 1134 |
|
$this->addFilterCheck($key); |
| 1135 |
|
|
| 1136 |
|
return $this->filters[$key] = new Filter\FilterRange($this, $key, $name, $column, $name_second); |
| 1137 |
|
} |
| 1138 |
|
|
| 1139 |
|
|
| 1140 |
|
/** |
|
@@ 1148-1159 (lines=12) @@
|
| 1145 |
|
* @return Filter\FilterDateRange |
| 1146 |
|
* @throws DataGridException |
| 1147 |
|
*/ |
| 1148 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 1149 |
|
{ |
| 1150 |
|
$column = $column ?: $key; |
| 1151 |
|
|
| 1152 |
|
if (!is_string($column)) { |
| 1153 |
|
throw new DataGridException("FilterDateRange can only filter in one column."); |
| 1154 |
|
} |
| 1155 |
|
|
| 1156 |
|
$this->addFilterCheck($key); |
| 1157 |
|
|
| 1158 |
|
return $this->filters[$key] = new Filter\FilterDateRange($this, $key, $name, $column, $name_second); |
| 1159 |
|
} |
| 1160 |
|
|
| 1161 |
|
|
| 1162 |
|
/** |