/** * Build the filter query for the given element. * Can be overwritten in plugin - e.g. see checkbox element which checks for partial matches * * @param string $key Element name in format `tablename`.`elementname` * @param string $condition =/like etc. * @param string $value Search string - already quoted if specified in filter array options * @param string $originalValue Original filter value without quotes or %'s applied * @param string $type Filter type advanced/normal/prefilter/search/querystring/searchall * * @return string sql query part e,g, "key = value" */ public function getFilterQuery($key, $condition, $value, $originalValue, $type = 'normal') { $params = $this->getParams(); $condition = JString::strtoupper($condition); $this->encryptFieldName($key); if ((bool) $params->get('multiple', false)) { // Multiple select options need to be treated specially (regardless of filter type?) // see http://fabrikar.com/forums/index.php?threads/how-filter-a-dropdown-element-in-the-plug-fabrik-content.42089/ $str = $this->filterQueryMultiValues($key, $condition, $originalValue); } else { $str = parent::getFilterQuery($key, $condition, $value, $originalValue, $type); } return $str; }