|
@@ 777-788 (lines=12) @@
|
| 774 |
|
* @return Filter\FilterSelect |
| 775 |
|
* @throws DataGridException |
| 776 |
|
*/ |
| 777 |
|
public function addFilterSelect($key, $name, $options, $column = NULL) |
| 778 |
|
{ |
| 779 |
|
$column = $column ?: $key; |
| 780 |
|
|
| 781 |
|
if (!is_string($column)) { |
| 782 |
|
throw new DataGridException("Filter Select can only filter through one column."); |
| 783 |
|
} |
| 784 |
|
|
| 785 |
|
$this->addFilterCheck($key); |
| 786 |
|
|
| 787 |
|
return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column); |
| 788 |
|
} |
| 789 |
|
|
| 790 |
|
|
| 791 |
|
/** |
|
@@ 821-832 (lines=12) @@
|
| 818 |
|
* @return Filter\FilterRange |
| 819 |
|
* @throws DataGridException |
| 820 |
|
*/ |
| 821 |
|
public function addFilterRange($key, $name, $column = NULL, $name_second = '-') |
| 822 |
|
{ |
| 823 |
|
$column = $column ?: $key; |
| 824 |
|
|
| 825 |
|
if (!is_string($column)) { |
| 826 |
|
throw new DataGridException("FilterRange can only filter through one column."); |
| 827 |
|
} |
| 828 |
|
|
| 829 |
|
$this->addFilterCheck($key); |
| 830 |
|
|
| 831 |
|
return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second); |
| 832 |
|
} |
| 833 |
|
|
| 834 |
|
|
| 835 |
|
/** |
|
@@ 843-854 (lines=12) @@
|
| 840 |
|
* @return Filter\FilterDateRange |
| 841 |
|
* @throws DataGridException |
| 842 |
|
*/ |
| 843 |
|
public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-') |
| 844 |
|
{ |
| 845 |
|
$column = $column ?: $key; |
| 846 |
|
|
| 847 |
|
if (!is_string($column)) { |
| 848 |
|
throw new DataGridException("FilterDateRange can only filter through one column."); |
| 849 |
|
} |
| 850 |
|
|
| 851 |
|
$this->addFilterCheck($key); |
| 852 |
|
|
| 853 |
|
return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second); |
| 854 |
|
} |
| 855 |
|
|
| 856 |
|
|
| 857 |
|
/** |