ConditionalFilterTrait ​
- Type
- Trait
- Namespace
- craft\filters
- Implemented by
- craft\filters\UtilityAccess
- Since
- 4.13.0
Filter for ensuring the user should be able to access the configured utility.
Public Properties ​
| Property | Description |
|---|---|
| when | callable, null – A PHP callable that determines when this filter should be applied. |
when ​
A PHP callable that determines when this filter should be applied.
Protected Methods ​
| Method | Description |
|---|---|
| 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.
Arguments ​
$action(yii\base\Action) – The action being filtered
Returns ​
boolean – Whether the filter is active for the given action.