public getFilterConditionExt ( $value, $operator, $params = [] ) : string | ||
$value | ||
$operator | ||
$params | optional params used to change the behavior | |
return | string |
public function getFilterConditionExt($value, $operator, $params = [])
{
$db = \Pimcore\Db::get();
$name = $params["name"] ? $params["name"] : $this->name;
$value = $db->quote($value);
$key = $db->quoteIdentifier($this->name, $name);
return "IFNULL(" . $key . ", 0) = " . $value . " ";
}