Stores chosen category filter into session.

Session variables:
<b>session_attrfilter</b>
513587
public function executefilter()
    {
        $baseLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
        // store this into session
        $attributeFilter = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('attrfilter', true);
        $activeCategory = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cnid');

        if (!empty($attributeFilter)) {
            $sessionFilter = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('session_attrfilter');
            //fix for #2904 - if language will be changed attributes of this category will be deleted from session
            //and new filters for active language set.
            $sessionFilter[$activeCategory] = null;
            $sessionFilter[$activeCategory][$baseLanguageId] = $attributeFilter;
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('session_attrfilter', $sessionFilter);
        }
    }
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;
        }
194046
public static void compareContextState(String filterName, SessionContext context, SessionContext copy) {
        // TODO - only comparing Attributes. Need to compare the messages too.
        Iterator<String> it = context.keySet().iterator();
        String key = it.next();
        while (key != null) {
            if ((!key.equals("routingDebug") && !key.equals("requestDebug"))) {
                Object newValue = context.get(key);
                Object oldValue = copy.get(key);
                if (oldValue == null && newValue != null) {
                    addRoutingDebug(context, "{" + filterName + "} added " + key + "=" + newValue.toString());
                } else if (oldValue != null && newValue != null) {
                    if (!(oldValue.equals(newValue))) {
                        addRoutingDebug(context, "{" +filterName + "} changed " + key + "=" + newValue.toString());
                    }
                }
            }
            if (it.hasNext()) {
                key = it.next();
            } else {
                key = null;
            }
        }

    }
701076
def set_attributes(self, session_key, attributes):
        
        session = self._lookup_required_session(session_key)
        session.set_attributes(attributes)
        self.session_handler.on_change(session)
805398
def query(self, base, filterstr, attrlist=None):
		
		return self.conn.search_s(base, ldap.SCOPE_SUBTREE, filterstr, attrlist)
586080
def explicit_content_filter=(filter_level)
      filter_level = FILTER_LEVELS[filter_level] if filter_level.is_a?(Symbol)

      update_server_data(explicit_content_filter: filter_level)
    end
107591
private function applyFilters()
    {
        // Manage filters
        // Filter values come either from the form (GET)
        // Or from session
        $form = $this->getFiltersForm();

        if (!$form) {
            // No filters are configured for this admin
            return;
        }

        $this->loadFilterValues();
        // Init form with current data if any
        $form->setData($this->filterValues);

        $form->handleRequest($this->request);

        if ($form->isSubmitted()) {

            if ($form->get('reset')->isClicked()) {
                // Submitted for reset
                // Reset stored content
                $this->clearFilterValues();
                // Reset displayed values by rebuilding the form
                // yes, it's a pity we cannot simply change content of it
                $this->getFiltersForm(true);
            }
            else {
                // Submitted for filtering
                // Overwrite any stored values with the submitted ones
                // Update storage for subsequent requests
                $this->storeFilterValues($form->getData());
            }
        }

        // Map values, if any, to filters
        if (is_array($this->filterValues)) {
            foreach ($this->filters as $filter) {
                if (array_key_exists($filter->getName(), $this->filterValues)) {
                    $filter->setValue($this->filterValues[$filter->getName()]);
                }
            }
        }
    }
633545
public static mpssession[] get_filtered(nitro_service service, String filter) throws Exception
	{
		mpssession obj = new mpssession();
		options option = new options();
		option.set_filter(filter);
		mpssession[] response = (mpssession[]) obj.getfiltered(service, option);
		return response;
	}
908042
def filter_queryset(self, attrs, queryset):
        
        # If this is an update, then any unprovided field should
        # have it's value set based on the existing instance attribute.
        if self.instance is not None:
            for field_name in self.fields:
                if field_name not in attrs:
                    attrs[field_name] = getattr(self.instance, field_name)

        # Determine the filter keyword arguments and filter the queryset.
        filter_kwargs = {
            field_name: attrs[field_name]
            for field_name in self.fields
        }
        return queryset.filter(**filter_kwargs)
746349
private void initFilters() {
        ditaWriterFilter = new DitaWriterFilter();
        ditaWriterFilter.setLogger(logger);
        ditaWriterFilter.setJob(job);
        ditaWriterFilter.setEntityResolver(reader.getEntityResolver());

        topicFragmentFilter = new TopicFragmentFilter(ATTRIBUTE_NAME_CONREF, ATTRIBUTE_NAME_CONREFEND);

        tempFileNameScheme.setBaseDir(job.getInputDir());
    }
362435
def setFilterData(self, key, value):
        
        self._filterData[nativestring(key)] = nativestring(value)
875794
def matching_attributes?(attribute, filter)
      attribute.to_s.downcase == filter.to_s.delete('_').downcase
    end
145510
def filter(self, value=None, exclude=False, **selection):
        
        filters = self.meta.setdefault('filters', [])

        if value and len(selection):
            raise ValueError("Cannot specify a filter string and a filter keyword selection at the same time.")
        elif value:
            value = [value]
        elif len(selection):
            value = select(self.api.columns, selection, invert=exclude)

        filters.append(value)
        self.raw['filters'] = utils.paste(filters, ',', ';')
        return self
248516
public static ns_aaasession[] get_filtered(nitro_service service, String filter) throws Exception
	{
		ns_aaasession obj = new ns_aaasession();
		options option = new options();
		option.set_filter(filter);
		ns_aaasession[] response = (ns_aaasession[]) obj.getfiltered(service, option);
		return response;
	}
758024
def get_filter_options(cls):
        
        attr = '_filter_options_%s' % id(cls)

        options = getattr(cls, attr, {})
        if options:
            return options

        for key in dir(cls):
            val = getattr(cls, key)
            if isinstance(val, FilterOpt):
                options[key] = val

        setattr(cls, attr, options)
        return options
404973
def set_filter(self, props_filter):
        
        if props_filter is not None and not (
            is_string(props_filter)
            or isinstance(
                props_filter, (ldapfilter.LDAPFilter, ldapfilter.LDAPCriteria)
            )
        ):
            # Unknown type
            raise TypeError(
                "Invalid filter type {0}".format(type(props_filter).__name__)
            )

        if props_filter is not None:
            # Filter given, keep its string form
            self.__original_filter = str(props_filter)
        else:
            # No filter
            self.__original_filter = None

        # Parse the filter
        self.filter = ldapfilter.get_ldap_filter(props_filter)

        # Prepare the full filter
        spec_filter = "({0}={1})".format(OBJECTCLASS, self.specification)
        self.__full_filter = ldapfilter.combine_filters(
            (spec_filter, self.filter)
        )
1307966
def _get_filter(sdk_filter, attr_map):
    
    if not isinstance(sdk_filter, dict):
        raise CloudValueError('filter value must be a dictionary, was %r' % (sdk_filter,))
    custom = sdk_filter.pop('custom_attributes', {})
    new_filter = _normalise_key_values(filter_obj=sdk_filter, attr_map=attr_map)
    new_filter.update({
        'custom_attributes__%s' % k: v for k, v in _normalise_key_values(filter_obj=custom).items()
    })
    return new_filter