|
@@ 806-817 (lines=12) @@
|
| 803 |
|
* @return Filter\FilterSelect |
| 804 |
|
* @throws DataGridException |
| 805 |
|
*/ |
| 806 |
|
public function addFilterSelect($key, $name, $options, $column = NULL) |
| 807 |
|
{ |
| 808 |
|
$column = $column ?: $key; |
| 809 |
|
|
| 810 |
|
if (!is_string($column)) { |
| 811 |
|
throw new DataGridException("Filter Select can only filter through one column."); |
| 812 |
|
} |
| 813 |
|
|
| 814 |
|
$this->addFilterCheck($key); |
| 815 |
|
|
| 816 |
|
return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
| 817 |
|
} |
| 818 |
|
|
| 819 |
|
|
| 820 |
|
/** |
|
@@ 850-861 (lines=12) @@
|
| 847 |
|
* @return Filter\FilterRange |
| 848 |
|
* @throws DataGridException |
| 849 |
|
*/ |
| 850 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 851 |
|
{ |
| 852 |
|
$column = $column ?: $key; |
| 853 |
|
|
| 854 |
|
if (!is_string($column)) { |
| 855 |
|
throw new DataGridException("FilterRange can only filter through one column."); |
| 856 |
|
} |
| 857 |
|
|
| 858 |
|
$this->addFilterCheck($key); |
| 859 |
|
|
| 860 |
|
return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
| 861 |
|
} |
| 862 |
|
|
| 863 |
|
|
| 864 |
|
/** |
|
@@ 872-883 (lines=12) @@
|
| 869 |
|
* @return Filter\FilterDateRange |
| 870 |
|
* @throws DataGridException |
| 871 |
|
*/ |
| 872 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 873 |
|
{ |
| 874 |
|
$column = $column ?: $key; |
| 875 |
|
|
| 876 |
|
if (!is_string($column)) { |
| 877 |
|
throw new DataGridException("FilterDateRange can only filter through one column."); |
| 878 |
|
} |
| 879 |
|
|
| 880 |
|
$this->addFilterCheck($key); |
| 881 |
|
|
| 882 |
|
return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
| 883 |
|
} |
| 884 |
|
|
| 885 |
|
|
| 886 |
|
/** |