Quick search:


How to use global filters

The support of the framework for global filters is limited: It only puts filters in the session, gets them out later, and shows a description of the active filters in most pages. The creation of the filters and the actual filtering is up to the application developer.

To set or remove global filters, call the setGlobalFilters method on the Site object with the array of filters to be set. Take care only to use filters that correctly implement getPhpSource, it is used for serialization.

To get the global filters from the session, first include the filter classes you need, then call the setGlobalFilters method on the Site object. Because global filters may be used by several types, you may have to set the itemType on the filter before using it.

For an example of the use of global filters, see example 9.