Skip to content

Controller

filterChain()

filterChain() — returns array

Available in: controller Category: Configuration Functions

The filterChain() function returns an array of all filters that are set on the current controller in the order they will be executed. By default, it includes both before and after filters, but you can specify the type argument if you want to return only one type. For example, setting type=“after” will return only the filters that run after the controller action.

NameTypeRequiredDefaultDescription
typestringnoallUse this argument to return only before or after filters.
1. Get filter chain.
myFilterChain = filterChain();

2. Get filter chain for after filters only.
myFilterChain = filterChain(type="after");