FilterEditor: allow to set custom filter columns

This commit is contained in:
Thomas Gelf 2015-07-29 17:13:18 +02:00
parent e8af4295b1
commit ba906d2fca
1 changed files with 7 additions and 1 deletions

View File

@ -540,11 +540,17 @@ class FilterEditor extends AbstractWidget
);
}
public function setColumns(array $columns)
{
$this->cachedColumnSelect = $this->arrayForSelect($columns);
return $this;
}
protected function selectColumn(Filter $filter = null)
{
$active = $filter === null ? null : $filter->getColumn();
if ($this->query === null) {
if ($this->cachedColumnSelect === null && $this->query === null) {
return sprintf(
'<input type="text" name="%s" value="%s" />',
$this->elementId('column', $filter),