Builds the parameters for filtering by object states.
172873
private function buildObjectStateFilterParameters(ParameterBuilderInterface $builder, array $groups = []): void
    {
        $builder->add(
            'filter_by_object_state',
            ParameterType\Compound\BooleanType::class,
            [
                'groups' => $groups,
            ]
        );

        $builder->get('filter_by_object_state')->add(
            'object_states',
            EzParameterType\ObjectStateType::class,
            [
                'multiple' => true,
                'groups' => $groups,
            ]
        );
    }
116420
def filter(self, collection, data, **kwargs):
        """"""
        ops = self.parse(data)
        collection = self.apply(collection, ops, **kwargs)
        return ops, collection
1324874
function filterParameters(request) {
    const data = Object.assign({}, config);
    Object.keys(request).forEach((key) => {
      data[key] = request[key];
    });

    return data;
  }
1208358
def build_condition(filter_map, using=CONDITIONS):
    
    if not filter_map:
        return

    filters = {}
    dynamizer = Dynamizer()

    for field_and_op, value in filter_map.items():
        field_bits = field_and_op.split('__')
        fieldname = '__'.join(field_bits[:-1])

        try:
            op = using[field_bits[-1]]
        except KeyError:
            raise ConditionNotRecognizedException(
                "Operator '%s' from '%s' is not recognized." % (
                    field_bits[-1],
                    field_and_op
                )
            )

        lookup = {
            'AttributeValueList': [],
            'ComparisonOperator': op,
        }

        # Special-case the ``NULL/NOT_NULL`` case.
        if field_bits[-1] == 'null':
            del lookup['AttributeValueList']

            if value is False:
                lookup['ComparisonOperator'] = 'NOT_NULL'
            else:
                lookup['ComparisonOperator'] = 'NULL'
        # Special-case the ``BETWEEN`` case.
        elif field_bits[-1] == 'between':
            if len(value) == 2 and isinstance(value, (list, tuple)):
                lookup['AttributeValueList'].append(
                    dynamizer.encode(value[0])
                )
                lookup['AttributeValueList'].append(
                    dynamizer.encode(value[1])
                )
        # Special-case the ``IN`` case
        elif field_bits[-1] == 'in':
            for val in value:
                lookup['AttributeValueList'].append(dynamizer.encode(val))
        else:
            # Fix up the value for encoding, because it was built to only work
            # with ``set``s.
            if isinstance(value, (list, tuple)):
                value = set(value)
            lookup['AttributeValueList'].append(
                dynamizer.encode(value)
            )

        # Finally, insert it into the filters.
        filters[fieldname] = lookup
    return filters
341461
public static Collection<MatchedMethod> filterByClosestParams(
            final Collection<MatchedMethod> possibilities, final int paramsCount) {
        Collection<MatchedMethod> res = null;
        for (int i = 0; i < paramsCount; i++) {
            final Collection<MatchedMethod> filtered = filterByParam(possibilities, i);
            if (res != null) {
                if (filtered.size() < res.size()) {
                    res = filtered;
                }
            } else {
                res = filtered;
            }
        }
        return res;
    }
158023
function processState (instance) {
  const props = isLegacy
    ? instance._props
    : instance.$options.props
  const getters =
    instance.$options.vuex &&
    instance.$options.vuex.getters
  return Object.keys(instance._data)
    .filter(key => (
      !(props && key in props) &&
      !(getters && key in getters)
    ))
    .map(key => ({
      key,
      value: instance._data[key],
      editable: true
    }))
}
862717
def _discover_params(cls):
        

        try:
            return cls.filters
        except AttributeError:
            filters = {}
            for param_class_name in dir(cls):
                param_class = getattr(cls, param_class_name)
                if hasattr(param_class, 'kwarg'):
                    filters[param_class.kwarg] = param_class
                    filters[param_class.param_name] = param_class
            cls.filters = filters
        return cls.filters
767090
function applyFilterOnObject(obj, filterFn) {
    if (filterFn == null) {
        return Object.assign({}, obj);
    }

    const filteredObj = {};
    coreObjectEntries(obj).forEach(([key, val]) => {
        if (filterFn(val, key)) {
            filteredObj[key] = val;
        }
    });

    return filteredObj;
}
717499
function filterObject(gobj, filter) {
	let found = true;
	let obj = gobj;

	// find the value we're interested in
	for (let i = 0, len = filter.length; obj && typeof obj === 'object' && i < len; i++) {
		if (!obj.hasOwnProperty(filter[i])) {
			found = false;
			obj = undefined;
			break;
		}
		obj = obj[filter[i]];
	}

	return { found, obj };
}
866489
@SuppressWarnings("unchecked")
	private Map<String, Object> buildParameters(Object parameters) {
		Map<String, Object> parameterMap = new HashMap<String, Object>();

		if (parameters != null) {
			if (parameters.getClass().isArray()) {
				Object[] paramValues = (Object[]) parameters;
				for (int i = 0; i < paramValues.length; i++) {
					if (paramValues[i] == null) {
						paramValues[i] = "";
					}
					parameterMap.put(Integer.toString(i), paramValues[i]);
				}
			} else if (parameters instanceof Map) {
				parameterMap = (Map<String, Object>) parameters;
			} else {
				Class<? extends Object> paramClass = parameters.getClass();
				Field[] fields = paramClass.getDeclaredFields();
				for (Field field : fields) {
					field.setAccessible(true);

					String fieldName = field.getName();
					Object fieldValue = null;
					try {
						fieldValue = field.get(parameters);
					} catch (Exception e) {
						fieldValue = null;
					}
					if (fieldName != null && fieldValue != null) {
						parameterMap.put(fieldName, fieldValue);
					}
				}
			}
		}

		return parameterMap;
	}
379591
function () {
    // Create hash table for easy reference
    var collectionValues = hashTable(this.collection.toJSON(), 'label', 'value')
    var filteredCollectionValues = hashTable(this.filteredCollection.toJSON(), 'label', 'value')

    // Add value from hash tables to geojson properties
    var idAttribute = this.boundaries.idAttribute
    var filtered = this.filteredCollection.getFilters().length
    this.boundaries.forEach(function (item) {
      var properties = item.get('properties')
      properties.value = collectionValues[properties[idAttribute]]
      if (filtered) {
        properties.filteredValue = filteredCollectionValues[properties[idAttribute]] || 0
      }
      item.set('properties', properties)
    }, this)
  }
992902
def ParseObjs(self, objs, expression):
    """"""
    filt = self._Compile(expression)
    for result in filt.Filter(objs):
      yield result
826454
protected function buildPointcutFilters()
    {
        $this->filters = [];
        /** @var PolicyService $policyService */
        $policyService = $this->objectManager->get(PolicyService::class);
        /** @var MethodPrivilegeInterface[] $methodPrivileges */
        $methodPrivileges = $policyService->getAllPrivilegesByType(MethodPrivilegeInterface::class);
        foreach ($methodPrivileges as $privilege) {
            $this->filters[$privilege->getCacheEntryIdentifier()] = $privilege->getPointcutFilterComposite();
        }
    }
237231
function filter(obj) {
    var result = {}, fieldDefine, value;
    for(var field in options) {
      fieldDefine = options[field];
      value = obj[field];
      if(!fieldDefine.private && value !== undefined) {
        result[field] = value;
      }
    }
    return result;
  }
994339
public function buildFilters()
    {
        $this->addFilter('title', new StringFilterType('title'), 'article.page.list.filter.title')
            ->addFilter('online', new BooleanFilterType('online'), 'article.page.list.filter.online')
            ->addFilter('created', new DateFilterType('created', 'nv'), 'article.page.list.filter.created_at')
            ->addFilter('updated', new DateFilterType('updated', 'nv'), 'article.page.list.filter.updated_at');
    }
677718
def filters(self):
        
        params = {}
        for _filter in self._filters:
            params.update(_filter)

        return params
391578
def filter_params(self, value):
        
        if value is None:
            return {}

        key = self.target
        if self.lookup_type is not None:
            key += '__' + self.lookup_type
        return { key: value }