Generates a two dimensional array with the filters. First level is:
'excludeNodeTypes'
'includeNodeTypes'

Both are numeric arrays with the respective node types that are included or excluded.

@param string|null $nodeTypeFilter
@return array
17896
protected function getNodeTypeFilterConstraintsForDql($nodeTypeFilter = '')
    {
        $nodeTypeFilter = empty($nodeTypeFilter) ? '' : $nodeTypeFilter;
        $constraints = [
            'excludeNodeTypes' => [],
            'includeNodeTypes' => []
        ];

        $nodeTypeFilterParts = Arrays::trimExplode(',', $nodeTypeFilter);
        foreach ($nodeTypeFilterParts as $nodeTypeFilterPart) {
            $nodeTypeFilterPart = trim($nodeTypeFilterPart);
            if (strpos($nodeTypeFilterPart, '!') === 0) {
                $negate = true;
                $nodeTypeFilterPart = substr($nodeTypeFilterPart, 1);
            } else {
                $negate = false;
            }
            $nodeTypeFilterPartSubTypes = array_merge([$this->nodeTypeManager->getNodeType($nodeTypeFilterPart)], $this->nodeTypeManager->getSubNodeTypes($nodeTypeFilterPart));

            foreach ($nodeTypeFilterPartSubTypes as $nodeTypeFilterPartSubType) {
                if ($negate === true) {
                    $constraints['excludeNodeTypes'][] = $nodeTypeFilterPartSubType->getName();
                } else {
                    $constraints['includeNodeTypes'][] = $nodeTypeFilterPartSubType->getName();
                }
            }
        }

        return $constraints;
    }
1324358
protected function generateNodeTypeDefinitions()
    {
        $code = '';
        /** @var NodeType $nodeType */
        foreach ($this->nodeTypeManager->getNodeTypes(false) as $nodeType) {
            $code .= $this->generateFusionForNodeType($nodeType);
        }
        return $code;
    }
1223308
public function iterator($filter = null){
        $ret = new Iterator($this, $this->vo);
        $ret->setCloneVo($this->toCloneVo);
        $this->setupIteratorRelations($ret);
        $ret->setRoot();

        if ($filter != null){
            $ret = new Filter($ret, $filter);
        }
        return $ret;
    }
972233
public function getRootAssociations($associationsFilter = null)
    {
        $arrayWithChilds = $this->associationsApiService->getRootAssociations($associationsFilter);

        $associations = new Associations();

        foreach ($arrayWithChilds as $xmlQuery) {
            $association = new Association();

            $mapper = new \RGU\Dvoconnector\Mapper\Association($xmlQuery);
            $mapper->mapToAbstractEntity($association);

            $associations->addAssociation($this->completeEntity($association));
        }

        return $this->completeEntity($associations);
    }
122748
protected function renderChildrenInformation(NodeInterface $node, string $nodeTypeFilterString): array
    {
        $documentChildNodes = $node->getChildNodes($nodeTypeFilterString);
        // child nodes for content tree, must not include those nodes filtered out by `baseNodeType`
        $contentChildNodes = $node->getChildNodes($this->buildContentChildNodeFilterString());
        $childNodes = array_merge($documentChildNodes, $contentChildNodes);

        $mapper = function (NodeInterface $childNode) {
            return [
                'contextPath' => $childNode->getContextPath(),
                'nodeType' => $childNode->getNodeType()->getName() // TODO: DUPLICATED; should NOT be needed!!!
            ];
        };

        return array_map($mapper, $childNodes);
    }
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;
    }
922886
public function getAll($filter = null)
    {
        $className = self::getEntitiesClassName();
        $results = $this->getDataSource()->retrieveAll($filter);

        // Convert the resulting data to entities.
        $entities = array();
        foreach ($results as $data) {
            $id = @$data['id'];
            $entity = $this->getEntity($id);
            if (empty($entity)) {
                $entity = new $className($data);
            }
            $entities[] = $entity;
        }

        return $entities;
    }
365006
public function getFilter($filter)
    {
        $result = null;

        if(isset($this->__filters[$filter])) {
            $result = $this->__filters[$filter];
         }

        return $result;
    }
636388
public function getFilters()
    {
        if (is_array($this->filters)) {
            return $this->filters;
        }

        $request = $this->getRequest();
        $toolbarFilters = $request->getPost('toolbarFilters', $request->getQuery('toolbarFilters'));
        $filters = [];
        if (($request->isPost() === true || $request->isGet() === true) &&
            null !== $toolbarFilters
        ) {
            foreach ($toolbarFilters as $uniqueId => $value) {
                if ($value != '') {
                    foreach ($this->getColumns() as $column) {
                        /* @var $column \ZfcDatagrid\Column\AbstractColumn */
                        if ($column->getUniqueId() == $uniqueId) {
                            $filter = new \ZfcDatagrid\Filter();
                            $filter->setFromColumn($column, $value);

                            $filters[] = $filter;

                            $column->setFilterActive($filter->getDisplayColumnValue());
                        }
                    }
                }
            }
        }

        if (! empty($filters)) {
            $this->filters = $filters;
        } else {
            // No user sorting -> get default sorting
            $this->filters = $this->getFiltersDefault();
        }

        return $this->filters;
    }
494202
public function &getNonDimensionalRoleRefs( $filter = array(), $sort = true )
	{
		// Make sure the filter is initialized and contains lowercase values
		if ( ! is_array( $filter ) ) $filter = array();
		$filter = array_flip( array_map( 'strtolower', $filter ) );

		$refs = $this->context->nonDimensionalRoleRefs;

		/**
		 * @var array $result
		 */
		$result = array();

		foreach ( $refs as $refKey => $ref )
		{
			// Apply the filter if one is provided
			if ( count( $filter ) && ! isset( $filter[ strtolower( $refKey ) ] ) ) continue;

			$result[ $refKey ] = $this->context->nonDimensionalRoleRefs[ $refKey ];
			foreach ( $result[ $refKey ] as $arcroleKey => $arcrole )
			{
				// If the acrole type is defined, get the cycles allowed otherwise set it to be 'none'
				$arcRoleTaxonomy = $this->getTaxonomyForXSD( $arcrole['href'] );
				$arcRoleRefs = $arcRoleTaxonomy ? $arcRoleTaxonomy->getArcroleTypes() : false;
				if ( $arcRoleRefs && isset( $arcRoleRefs['link:definitionArc'][ $arcroleKey ] ) )
				{
					$arcRoleRef = $arcRoleRefs['link:definitionArc'][ $arcroleKey ];
					$result[ $refKey ][ $arcroleKey ]['text'] = isset( $arcRoleRef['description'] ) ? $arcRoleRef['description'] : "";
					$result[ $refKey ][ $arcroleKey ]['cyclesAllowed'] = isset( $arcRoleRef['cyclesAllowed'] ) ? $arcRoleRef['cyclesAllowed'] : "none";
				}
				else
				{
					$result[ $refKey ][ $arcroleKey ]['text'] = "";
					$result[ $refKey ][ $arcroleKey ]['cyclesAllowed'] = "none";
				}

				// Add the description
				$description = $arcRoleTaxonomy->getNonDimensionalArcRoleDescription( $arcroleKey );
				$result[ $refKey ][ $arcroleKey ]['text'] = $description ? $description : "";

				// Remove any prohibited arcs
				if ( isset( $result[ $refKey ][ $arcroleKey ]['arcs'] ) && count( $result[ $refKey ][ $arcroleKey ]['arcs'] ) )
				{
					$arcs =& $result[ $refKey ][ $arcroleKey ]['arcs'];
					foreach ( $arcs as $from => $targets )
					{
						foreach ( $targets as $to => $node )
						{
							if ( $node['use'] == XBRL_Constants::$xlinkUseOptional ) continue;
							unset( $arcs[ $from ][ $to ] );
						}

						if ( count( $arcs[ $from ] ) ) continue;
						unset( $arcs[ $from ] );
					}
				}
			}

			if ( $sort )
			{
				$this->sortRoleRefs( $result[ $refKey ] );
			}

		}

		return $result;
	}
1077163
public function getChildParts(PartFilter $filter = null)
    {
        if ($filter !== null) {
            return array_values(array_filter($this->children, [ $filter, 'filter' ]));
        }
        return $this->children;
    }
1029674
public function getFilters(): array
    {
        return [
            new TwigFilter('substr', 'substr'),
            new TwigFilter('tokenize', 'Cake\Utility\Text::tokenize'),
            new TwigFilter('insert', 'Cake\Utility\Text::insert'),
            new TwigFilter('cleanInsert', 'Cake\Utility\Text::cleanInsert'),
            new TwigFilter('wrap', 'Cake\Utility\Text::wrap'),
            new TwigFilter('wrapBlock', 'Cake\Utility\Text::wrapBlock'),
            new TwigFilter('wordWrap', 'Cake\Utility\Text::wordWrap'),
            new TwigFilter('highlight', 'Cake\Utility\Text::highlight'),
            new TwigFilter('tail', 'Cake\Utility\Text::tail'),
            new TwigFilter('truncate', 'Cake\Utility\Text::truncate'),
            new TwigFilter('excerpt', 'Cake\Utility\Text::excerpt'),
            new TwigFilter('toList', 'Cake\Utility\Text::toList'),
            new TwigFilter('isMultibyte', 'Cake\Utility\Text::isMultibyte'),
            new TwigFilter('utf8', 'Cake\Utility\Text::utf8'),
            new TwigFilter('ascii', 'Cake\Utility\Text::ascii'),
            new TwigFilter('parseFileSize', 'Cake\Utility\Text::parseFileSize'),
            new TwigFilter('none', function ($string) {
                return;
            }),
        ];
    }
649187
function(category, filter) {
            var r = [];
            for (var i in this.registered_node_types) {
                var type = this.registered_node_types[i];
                if (filter && type.filter && type.filter != filter) {
                    continue;
                }

                if (category == "") {
                    if (type.category == null) {
                        r.push(type);
                    }
                } else if (type.category == category) {
                    r.push(type);
                }
            }

            return r;
        }
1058433
protected function getAssociationsFilter(string $filter = null)
    {
        $mappingConfiguration = new PropertyMappingConfiguration();
        $mappingConfiguration->setTypeConverter($this->typeConverterObjectConverter);
        $mappingConfiguration->setTypeConverterOption(\RGU\Dvoconnector\Property\TypeConverter\ObjectConverter::class, \RGU\Dvoconnector\Property\TypeConverter\ObjectConverter::CONFIGURATION_OBJECT, $this->getDefaultAssociationsFilter());

        return $this->convertAssociationsFilter($mappingConfiguration, $filter);
    }
519343
protected function initFilters()
    {
        $initColumnSearch = $this->initColumnSearch;
        foreach ($this->columns as $c) {
            if (isset($c['sqlFilter'])) {
                $where_condition = $this->generateSQLColumnFilter($this->toSQLColumn($c, 2), $c['sqlFilter']);
                if (!$this->setHaving($where_condition, $c)) {
                    $initColumnSearch[] = $this->generateSQLColumnFilter($this->toSQLColumn($c, 2), $c['sqlFilter']);
                }
            }
        }

        return implode(' AND ', $initColumnSearch);
    }
15158
private function getParamsFromFilter()
    {
        if (!$this->body['filter']) {
            return [];
        }

        $result  = [];
        $must    = [];
        $mustNot = [];

        $params = $this->body['filter']->getParams();

        if (isset($params['groupBy']) && $params['groupBy']) {
            $result = $this->initGroupBy($params['factorValues'] ?? []);
        }

        if (isset($params['factorValues']) && $params['factorValues'] && !$this->groupBy) {
            $sortEl[] = new SortElement("_script", "desc", [
                'type'   => "number",
                'script' => (new MathSumWithFactor($params['factorValues']))->getAlgorithm(),
            ]);

            $this->body['sort'] = (new SortBuilder($sortEl))->toArray()['sort'];
        }

        if (isset($params['entities']) && $params['entities']) {
            $result['index'] = $params['entities'];
        }

        if (isset($params['keyword'])) {
            $must[] = new MultiMatchQuery($params['keyword']['value'], $params['keyword']['fields']);
        }

        foreach ($params['params'] ?? [] as $param) {
            list($query, $operator) = $param->createFilter();

            if ($operator == FilterOperators::IN) {
                $must[] = $query;
            } else {
                $mustNot[] = $query;
            }
        }

        if ($mustNot || $must) {

            $query = new QueryBuilder();
            if ($mustNot) {
                $query->setMustNot(new MustNotQuery($mustNot));
            }
            if ($must) {
                $query->setMust(new MustQuery($must));
            }

            $result['body']['query'] = $query->toArray();
        }

        return $result;
    }
698124
public function getFilterOptionsForDcGeneral()
    {
        if (!$this->isFilterOptionRetrievingPossible(null)) {
            return [];
        }

        $originalLanguage       = $GLOBALS['TL_LANGUAGE'];
        $GLOBALS['TL_LANGUAGE'] = $this->getMetaModel()->getActiveLanguage();

        $filter = $this->getSelectMetaModel()->getEmptyFilter();

        $this->buildFilterRulesForFilterSetting($filter);

        $objItems = $this->getSelectMetaModel()->findByFilter(
            $filter,
            $this->getSortingColumn(),
            0,
            0,
            'ASC',
            [$this->getValueColumn(), $this->getIdColumn()]
        );

        $GLOBALS['TL_LANGUAGE'] = $originalLanguage;

        return $this->convertItemsToFilterOptions($objItems, $this->getValueColumn(), $this->getIdColumn());
    }