/**
  * {@inheritDoc}
  */
 protected function _applyFilter(QueryBuilderInterface $queryBuilder)
 {
     if (empty($this->_value)) {
         return;
     }
     $queryBuilder->leftJoin('page_tag', 'page_tag.page_id = page.page_id')->where('page_tag.tag_name IN (?js)', [$this->_value]);
 }
 /**
  * Will not apply the filter if both values are null.
  * If the filter is applied and the content field is not set on the page, it will not show up in the results
  *
  * {@inheritDoc}
  */
 protected function _applyFilter(QueryBuilderInterface $queryBuilder)
 {
     $joinedContent = false;
     foreach ($this->_value as $key => $value) {
         if (false === $joinedContent && null !== $value) {
             $queryBuilder->leftJoin($this->_getContentAlias(), $this->_getJoinStatement(), 'page_content')->where($this->_getContentAlias() . '.field_name = ?s', [$this->_field]);
             $joinedContent = true;
         }
         if (null !== $value) {
             if ($key === RangeFilterForm::MIN) {
                 $queryBuilder->where($this->_castSQLValue($this->_getContentAlias() . '.value_string') . ' >= ' . $this->_castSQLValue('?s'), [$this->_value[RangeFilterForm::MIN]]);
             } elseif ($key === RangeFilterForm::MAX) {
                 $queryBuilder->where($this->_castSQLValue($this->_getContentAlias() . '.value_string') . ' <= ' . $this->_castSQLValue('?s'), [$this->_value[RangeFilterForm::MAX]]);
             } else {
                 throw new \LogicException('Key `' . $key . '` should not exist on value!');
             }
         }
     }
 }
 /**
  * {@inheritDoc}
  */
 protected function _applyFilter(QueryBuilderInterface $queryBuilder)
 {
     $queryBuilder->leftJoin($this->_getContentAlias(), $this->_getJoinStatement(), 'page_content')->where($this->_getContentAlias() . '.field_name = ?s', [$this->_field])->where($this->_getContentAlias() . '.value_string IN (?js)', [$this->_value]);
 }