diff --git a/Builder/Admin/FiltersBuilder.php b/Builder/Admin/FiltersBuilder.php index a8499617..30a4e1d3 100755 --- a/Builder/Admin/FiltersBuilder.php +++ b/Builder/Admin/FiltersBuilder.php @@ -40,23 +40,31 @@ protected function findColumns() ) ) ); - + $column->setFormType( - $this->getFieldGuesser()->getFilterType( - $column->getDbType(), - $columnName + $this->getFieldOption( + $column, + 'filterType', + $this->getFieldGuesser()->getFilterType( + $column->getDbType(), + $columnName + ) ) ); $column->setFormOptions( - $this->getFieldGuesser()->getFilterOptions( - $column->getFormType(), - $column->getDbType(), - $columnName + $this->getFieldOption( + $column, + 'filterOptions', + $this->getFieldGuesser()->getFilterOptions( + $column->getFormType(), + $column->getDbType(), + $columnName + ) ) ); - //Set the user parameters + // Set the user parameters $this->setUserColumnConfiguration($column); $this->addColumn($column); diff --git a/Generator/Column.php b/Generator/Column.php index 815ee925..b27fa193 100755 --- a/Generator/Column.php +++ b/Generator/Column.php @@ -28,6 +28,10 @@ class Column protected $formOptions = array(); + protected $filterType; + + protected $filterOptions = array(); + protected $getter; protected $label = null; @@ -158,6 +162,16 @@ public function getFormType() return $this->formType; } + public function setFilterType($filterType) + { + $this->filterType = $filterType; + } + + public function getFilterType() + { + return $this->filterType; + } + public function setFormOptions($formOptions) { $this->formOptions = $formOptions; @@ -168,6 +182,16 @@ public function getFormOptions() return $this->formOptions; } + public function setFilterOptions($filterOptions) + { + $this->filterOptions = $filterOptions; + } + + public function getFilterOptions() + { + return $this->filterOptions; + } + public function setCredentials($credentials) { $this->credentials = $credentials;