@param FilterInterface $filter filter to be used to select modules for matching conditions

@return ModuleInterface[] a list of registered modules
8014
public function getModules(FilterInterface $filter = null)
    {
        if ($filter !== null) {
            return $filter->filter($this->modules);
        }

        return $this->modules;
    }
954947
public function get_filter_values($filter) {
        if ($allvalues = (array) $this->get_config('filtervalues')) {
            if (isset($allvalues[$filter])) {
                return $allvalues[$filter];
            }
        }

        return [];
    }
1288955
public function isEAVFilter(FilterInterface $filter): bool
    {
        try {
            $this->getEAVAttributes($filter);

            return true;
        } catch (MissingAttributeException $e) {
            return false;
        }
    }
1368110
private function addFilter($filter)
    {
        if (is_array($filter)) {
            if (!isset($filter['method'])) {
                throw new \InvalidArgumentException(
                    'A [method] value must be specified for each complex filter'
                );
            }
        }

        if (!$this->filters) {
            $this->filters = [$filter];
        } else {
            $this->filters[] = $filter;
        }

        return $this;
    }
1012283
public function filter($filter = null)
    {
        if (is_null($filter)) {
            return $this->filter;
        } else {
            $this->filter = $filter;
        }
    }
1336107
public function removeFilter(FilterInterface $filter)
    {

        $this->filters = array_filter($this->filters, function (FilterInterface $f) use ($filter) {

            return $f !== $filter;
        });

        return $this;
    }
697667
public function getAll($filter = null)
    {
        $filters = array('all', 'sales', 'purchase', 'inactive');
        if (!in_array($filter, $filters)) {
            $message = 'Unknown filter "' . $filter . '" for TaxRates';
            $message .= '; available filters: ' . implode(', ', $filters);
            throw new InvalidFilterException($message);
        }

        $rates = new ArrayObject;
        foreach ($this->connector->getAll(__NAMESPACE__) as $rate) {
            if (($filter == 'inactive' && $rate->active) || ($filter != 'inactive' && !$rate->active)) {
                continue;
            }
            if ($filter == 'sales' && $rate->taxRateType != TaxRate::RATE_TYPE_SALES) {
                continue;
            } elseif ($filter == 'purchase' && $rate->taxRateType != TaxRate::RATE_TYPE_PURCHASE) {
                continue;
            }
            $rates->append($rate);
        }
        return $rates;
    }
18397
public function filter(ODataQueryFilterInterface $filter = NULL) {
        if (isset($filter)) {
            $this->setFilter($filter);
            return $this;
        }
        return $this->getFilter();
    }
213003
private function resolveFilterType(Filter\FilterTypeInterface $type)
    {
        $typeExtensions = [];
        $parentType = $type->getParent();
        $class = get_class($type);

        foreach ($this->extensions as $extension) {
            $typeExtensions = array_merge(
                $typeExtensions,
                $extension->getFilterTypeExtensions($class)
            );
        }

        return $this->resolvedTypeFactory->createResolvedFilterType(
            $type,
            $typeExtensions,
            $parentType ? $this->getFilterType($parentType) : null
        );
    }
346325
private function getFilter(ConfigurationInterface $moduleConfiguration)
    {
        $filterId = $moduleConfiguration->getDefaultFilterId();
        if (isset($this->filterCache[$filterId])) {
            return $this->filterCache[$filterId];
        }
        $filterConfiguration = $this->dbAdapter->getFilterDefinitionFromId($moduleConfiguration->getDefaultFilterId());
        $this->filterCache[$filterId] = $this->filterFactory->createFilter($filterConfiguration);

        return $this->filterCache[$filterId];
    }
890440
public function ensure(FilterInterface $filter)
    {
        if ($filter instanceof \Traversable) {
            foreach ($filter as $f) {
                $this->ensure($f);
            }
        } elseif (!in_array($filter, $this->filters, true)) {
            $this->filters[] = $filter;
        }
    }
353087
private function applyFilter(Filter $filter)
    {
        list($filtered, $errors) = $filter->apply($this->value);
        if (count($errors) === 0) {
            return $filtered;
        }

        foreach ($errors as $error) {
            $this->paramErrors->append($this->paramName, $error);
        }

        return null;
    }
1091896
public function getOwnMethods($filter = -1)
    {
        $return = $this->getMethods($filter);

        $traitMethods = $traitAliases = array();
        foreach ($this->getTraits() as $trait) {
            $traitAliases = array_merge($traitAliases, $this->getTraitAliases());
            foreach ($trait->getMethods($filter) as $method) {
                $traitMethods[] = $method->getName();
            }
        }

        $traitMethods = array_merge($traitMethods, array_keys($traitAliases));

        foreach ($return as $key => $val) {
            if ($val->class === $this->getName() && in_array($val->getName(), $traitMethods) === false) {
                $return[$key] = new ReflectionMethod($this->getName(), $val->getName());
            } else {
                unset($return[$key]);
            }
        }

        return array_values($return);
    }
1226445
public static function getCategories($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/categories' . $filter->toQuery(), 'Category');
    }
889699
public function getMethods($filter = null)
    {
        if (!isset($this->methods)) {
            $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this);
            $parentMethods = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) {
                $reflectionMethods = [];
                foreach ($instance->getMethods() as $reflectionMethod) {
                    if (!$isParent || !$reflectionMethod->isPrivate()) {
                        $reflectionMethods[$reflectionMethod->name] = $reflectionMethod;
                    }
                }
                $result += $reflectionMethods;
            });
            $methods = $directMethods + $parentMethods;

            $this->methods = $methods;
        }
        if (!isset($filter)) {
            return array_values($this->methods);
        }

        $methods = [];
        foreach ($this->methods as $method) {
            if (!($filter & $method->getModifiers())) {
                continue;
            }
            $methods[] = $method;
        }

        return $methods;
    }
935685
public function hasConflictingFilters(ConflictingFilterInterface $filter)
    {
        foreach ((array) $filter->getConflictingFilters() as $filterName) {
            if ($this->hasFilter($filterName)) {
                return true;
            }
        }
        return false;
    }
1303700
protected function registerInstanceFilter($filter)
	{
		$this->getFilterer()->filter($filter, array($this, substr($filter, 1)));

		return $filter;
	}