System:Model:addFilters

From Aspen Documentation

Handles incoming filter params in url to add automated conditions to query.

Since 1.0

Contents

Arguments

array addFilters ([array $filters = false], [array $allowed_filter_keys = false], [array $disabled_filters = false])

filters
An array of field=>values that will be used to create conditions.
allowed_filter_keys
A list of fields allowed in filtering.
disabled_filters
A list of fields not allowed in filtering.

Returns

Returns the array of final filters.

Notes

  • If the filter parameter is in the GET or the SESSION request it will be used instead.

Examples

Example: