|
@@ 1041-1052 (lines=12) @@
|
| 1038 |
|
* @return Filter\FilterSelect |
| 1039 |
|
* @throws DataGridException |
| 1040 |
|
*/ |
| 1041 |
|
public function addFilterSelect($key, $name, array $options, $column = NULL) |
| 1042 |
|
{ |
| 1043 |
|
$column = $column ?: $key; |
| 1044 |
|
|
| 1045 |
|
if (!is_string($column)) { |
| 1046 |
|
throw new DataGridException("Filter Select can only filter in one column."); |
| 1047 |
|
} |
| 1048 |
|
|
| 1049 |
|
$this->addFilterCheck($key); |
| 1050 |
|
|
| 1051 |
|
return $this->filters[$key] = new Filter\FilterSelect($this, $key, $name, $options, $column); |
| 1052 |
|
} |
| 1053 |
|
|
| 1054 |
|
|
| 1055 |
|
/** |
|
@@ 1064-1075 (lines=12) @@
|
| 1061 |
|
* @return Filter\FilterSelect |
| 1062 |
|
* @throws DataGridException |
| 1063 |
|
*/ |
| 1064 |
|
public function addFilterMultiSelect($key, $name, array $options, $column = NULL) |
| 1065 |
|
{ |
| 1066 |
|
$column = $column ?: $key; |
| 1067 |
|
|
| 1068 |
|
if (!is_string($column)) { |
| 1069 |
|
throw new DataGridException("Filter MultiSelect can only filter in one column."); |
| 1070 |
|
} |
| 1071 |
|
|
| 1072 |
|
$this->addFilterCheck($key); |
| 1073 |
|
|
| 1074 |
|
return $this->filters[$key] = new Filter\FilterMultiSelect($this, $key, $name, $options, $column); |
| 1075 |
|
} |
| 1076 |
|
|
| 1077 |
|
|
| 1078 |
|
/** |
|
@@ 1086-1097 (lines=12) @@
|
| 1083 |
|
* @return Filter\FilterDate |
| 1084 |
|
* @throws DataGridException |
| 1085 |
|
*/ |
| 1086 |
|
public function addFilterDate($key, $name, $column = NULL) |
| 1087 |
|
{ |
| 1088 |
|
$column = $column ?: $key; |
| 1089 |
|
|
| 1090 |
|
if (!is_string($column)) { |
| 1091 |
|
throw new DataGridException("FilterDate can only filter in one column."); |
| 1092 |
|
} |
| 1093 |
|
|
| 1094 |
|
$this->addFilterCheck($key); |
| 1095 |
|
|
| 1096 |
|
return $this->filters[$key] = new Filter\FilterDate($this, $key, $name, $column); |
| 1097 |
|
} |
| 1098 |
|
|
| 1099 |
|
|
| 1100 |
|
/** |
|
@@ 1108-1119 (lines=12) @@
|
| 1105 |
|
* @return Filter\FilterRange |
| 1106 |
|
* @throws DataGridException |
| 1107 |
|
*/ |
| 1108 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 1109 |
|
{ |
| 1110 |
|
$column = $column ?: $key; |
| 1111 |
|
|
| 1112 |
|
if (!is_string($column)) { |
| 1113 |
|
throw new DataGridException("FilterRange can only filter in one column."); |
| 1114 |
|
} |
| 1115 |
|
|
| 1116 |
|
$this->addFilterCheck($key); |
| 1117 |
|
|
| 1118 |
|
return $this->filters[$key] = new Filter\FilterRange($this, $key, $name, $column, $name_second); |
| 1119 |
|
} |
| 1120 |
|
|
| 1121 |
|
|
| 1122 |
|
/** |
|
@@ 1130-1141 (lines=12) @@
|
| 1127 |
|
* @return Filter\FilterDateRange |
| 1128 |
|
* @throws DataGridException |
| 1129 |
|
*/ |
| 1130 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 1131 |
|
{ |
| 1132 |
|
$column = $column ?: $key; |
| 1133 |
|
|
| 1134 |
|
if (!is_string($column)) { |
| 1135 |
|
throw new DataGridException("FilterDateRange can only filter in one column."); |
| 1136 |
|
} |
| 1137 |
|
|
| 1138 |
|
$this->addFilterCheck($key); |
| 1139 |
|
|
| 1140 |
|
return $this->filters[$key] = new Filter\FilterDateRange($this, $key, $name, $column, $name_second); |
| 1141 |
|
} |
| 1142 |
|
|
| 1143 |
|
|
| 1144 |
|
/** |