Skip to content

ConditionalFilterTrait ​

Type
Trait
Namespace
craft\filters
Implemented by
craft\filters\UtilityAccess
Since
5.5.0

Filter for ensuring the user should be able to access the configured utility.

View source

Public Properties ​

PropertyDescription
whencallable, null – A PHP callable that determines when this filter should be applied.

when ​

Type
callable, null
Default value
null

A PHP callable that determines when this filter should be applied.

View source

Protected Methods ​

MethodDescription
isActive()Returns a value indicating whether the filter is active for the given action.

isActive() ​

Returns a value indicating whether the filter is active for the given action.

View source

Arguments ​

Returns ​

boolean – Whether the filter is active for the given action.