/** * @return Filter|null */ protected function getCurrentFilter() { if ($this->currentFilter instanceof Filter) { return $this->currentFilter; } elseif ($this->currentFilter instanceof NestedFilter) { return $this->currentFilter->getFilter(); } else { return null; } }