AssignRenderer: add renderEquals method...
...with (hopefully temporarily) hardcoded groups support
This commit is contained in:
parent
8519a287dc
commit
0a6514928a
|
@ -54,6 +54,23 @@ class AssignRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function renderEquals($column, $expression)
|
||||||
|
{
|
||||||
|
if ($column === 'groups') {
|
||||||
|
return sprintf(
|
||||||
|
'%s in %s',
|
||||||
|
$expression,
|
||||||
|
$column
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return sprintf(
|
||||||
|
'%s == %s',
|
||||||
|
$column,
|
||||||
|
$expression
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function renderFilterExpression($filter)
|
protected function renderFilterExpression($filter)
|
||||||
{
|
{
|
||||||
$column = $filter->getColumn();
|
$column = $filter->getColumn();
|
||||||
|
@ -67,11 +84,7 @@ class AssignRenderer
|
||||||
|
|
||||||
} elseif ($filter instanceof FilterMatch) {
|
} elseif ($filter instanceof FilterMatch) {
|
||||||
if (strpos($expression, '*') === false) {
|
if (strpos($expression, '*') === false) {
|
||||||
return sprintf(
|
return $this->renderEquals($column, $expression);
|
||||||
'%s == %s',
|
|
||||||
$column,
|
|
||||||
$expression
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'match(%s, %s)',
|
'match(%s, %s)',
|
||||||
|
|
Loading…
Reference in New Issue