Attaches filters to the manager.

@param Filter $filterManager
@param Application $app

@return Filter
358741
public function attachFiltersToManager(Filter $filterManager, Application $app)
    {
        $stripOnVisibility = new StripOnVisibility($app['descriptor.builder']);
        $filtersOnAllDescriptors = array(
            new StripInternal($app['descriptor.builder']),
            new StripIgnore($app['descriptor.builder'])
        );

        foreach ($filtersOnAllDescriptors as $filter) {
            $filterManager->attach('phpDocumentor\Descriptor\ConstantDescriptor', $filter);
            $filterManager->attach('phpDocumentor\Descriptor\FunctionDescriptor', $filter);
            $filterManager->attach('phpDocumentor\Descriptor\InterfaceDescriptor', $filter);
            $filterManager->attach('phpDocumentor\Descriptor\TraitDescriptor', $filter);
            $filterManager->attach('phpDocumentor\Descriptor\PropertyDescriptor', $filter);
            $filterManager->attach('phpDocumentor\Descriptor\MethodDescriptor', $filter);
        }

        $filterManager->attach('phpDocumentor\Descriptor\PropertyDescriptor', $stripOnVisibility);
        $filterManager->attach('phpDocumentor\Descriptor\MethodDescriptor', $stripOnVisibility);

        return $filterManager;
    }
359482
public function filterBy(
        string $filterName,
        string $field,
        array $values,
        int $applicationType = Filter::AT_LEAST_ONE,
        bool $aggregate = true,
        array $aggregationSort = Aggregation::SORT_BY_COUNT_DESC
    ): self {
        $fieldPath = Item::getPathByField($field);
        if (!empty($values)) {
            $this->filters[$filterName] = Filter::create(
                $fieldPath,
                $values,
                $applicationType,
                Filter::TYPE_FIELD
            );
        } else {
            unset($this->filters[$filterName]);
        }

        if ($aggregate) {
            $this->aggregateBy(
                $filterName,
                $field,
                $applicationType,
                $aggregationSort
            );
        }

        return $this;
    }
411599
public function addFilter(FilterInterface $filter) {
        if ($filter->supportsType($this->getType())) {
            $this->filters[] = $filter;
        }
        return $this;
    }
34137
protected function createFilterManager()
    {
        $manager = new FilterManager();
        $filters = Config::get($this->namespace.'::filters', array());
        foreach ($filters as $name => $filter) {
            $manager->set($name, $this->createFilter($filter));
        }

        return $this->filters = $manager;
    }
654198
public function register(Application $app)
    {
        $app['nn.markdown'] = $app->share(
            function () {
                return new Markdown(
                );
            }
        );

        if (isset($app["twig"])) {
            $app['twig'] = $app->share(
                $app->extend(
                    'twig',
                    function (\Twig_Environment $twig, Application $app) {
                        $filterParse = new \Twig_SimpleFilter(
                            'markdown_parse',
                            function ($text) use ($app) {
                                return $app['nn.markdown']->parse($text);
                            },
                            array('is_safe' => array('html'))
                        );
                        $twig->addFilter($filterParse);
                        $filterParseFile = new \Twig_SimpleFilter(
                            'markdown_parse_file',
                            function ($filename) use ($app) {
                                return $app['nn.markdown']->parseFile(
                                    $filename
                                );
                            },
                            array('is_safe' => array('html'))
                        );
                        $fucntionParseLastFile = new \Twig_SimpleFunction(
                            'markdown_parse_last_file',
                            function () use ($app) {
                                $content = "";
                                $finderLast = $app['nn.markdown']->getNLastFiles(1);
                                foreach ($finderLast as $file) {
                                    $content = $file->getContents();
                                }
                                return $app['nn.markdown']->parse($content);
                            },
                            array('is_safe' => array('html'))
                        );
                        $twig->addFilter($filterParse);
                        $twig->addFilter($filterParseFile);
                        $twig->addFunction($fucntionParseLastFile);
                        return $twig;
                    }
                )
            );
        }
    }
1366793
protected function addValidators(Application $app)
    {
        if (!isset($app['validator'])) {
            throw new Exception\MissingDependencyException('The validator manager is missing');
        }

        $provider = $this;
        $app['validator'] = $app->share(
            $app->extend(
                'validator',
                function ($validatorManager) use ($provider) {
                    return $provider->attachValidators($validatorManager);
                }
            )
        );
    }
128836
function addFiltersToModel(model, appName) {
    var rootDir = this.pancakes.getRootDir();
    var apps = ['common', appName];
    var me = this;

    // if filters don't exist in memory yet for given app, get them
    if (!filters[appName]) {
        filters[appName] = {};
        _.each(apps, function (app) {
            var filtersDir = rootDir + '/app/' + app + '/filters';
            var exists = utils.doesFileExist(filtersDir);

            if (exists) {
                _.each(fs.readdirSync(filtersDir), function (fileName) {
                    var filterName = me.pancakes.utils.getCamelCase(fileName);
                    filters[appName][filterName] = me.pancakes.cook('app/' + app + '/filters/' + fileName, null);
                });
            }
        });
    }

    _.extend(model, filters[appName]);
}
1309155
public function register()
    {
        $this->app['FilterManager'] = $this->app->share(function () {
                return FilterManager::create(Input::all())->setBlackList(['page']);
            });
    }
946636
public function getCollection(Application $app)
    {
        if ($this->getBaseId() !== null) {
          return \collection::getByBaseId($app, $this->getBaseId());
        }
    }
619738
public function AddFilter(CriteriaFilter $filter)
	{
		if (!$this->Filters) $this->Filters = array();
		$this->Filters[] = $filter;
	}
83058
public static appfwpolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
		appfwpolicy obj = new appfwpolicy();
		options option = new options();
		option.set_filter(filter);
		appfwpolicy[] response = (appfwpolicy[]) obj.getfiltered(service, option);
		return response;
	}
1146027
public function register(Application $app)
    {
        $this->loadProviders();

        foreach ($this->controllerProviders as $class => $values) {
            $app->register(new $class, $values);
        }
    }
659035
public static appflowpolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
		appflowpolicy obj = new appflowpolicy();
		options option = new options();
		option.set_filter(filter);
		appflowpolicy[] response = (appflowpolicy[]) obj.getfiltered(service, option);
		return response;
	}
203068
public function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
    {
        $fields = [];
        $conditions = [];
        foreach ($filterGroup->getFilters() as $filter) {
            $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
            $fields[] = $filter->getField();
            $conditions[] = [$condition => $filter->getValue()];
        }
        if ($fields) {
            $collection->addFieldToFilter($fields, $conditions);
        }
        return $this;
    }
723892
public void addFilterHolder(FilterHolder holder) 
    {
        _filterMap.put(holder.getName(), holder);
        _filters.add(holder);
        addComponent(holder);
    }
113932
@Override
    public FilterManager getFilterManager(PortletWindow window, String lifeCycle) {
        FilterManagerImpl filterManager = new FilterManagerImpl(window, lifeCycle);
        return filterManager;
    }
336671
public function addFilter($filter)
    {
        if (!$filter instanceof FilterInterface) {
            if (!is_callable($filter)) {
                throw new \InvalidArgumentException('Filter should be callable or ' . FilterInterface::class);
            }

            $filter = new CallbackFilter($filter);
        }

        $this->filters[] = $filter;

        return $this;
    }