Events
fpOnFieldFilter
Parameter | Description |
---|---|
name | The name of the field being filtered. This identifies which field the filter applies to. |
operator | A reference to the operator being used for the filter (e.g., =, !=, FIND_IN_SET). It can be modified by event listeners. |
value | A reference to the value being used for filtering. This can be modified by event listeners to change the filtering criteria dynamically. |
Example
php
if ($modx->event->name === 'fpOnFieldFilter' && $name === 'categories') {
$modx->event->params['operator'] = 'FIND_IN_SET';
if (!is_array($value)) {
$modx->event->params['value'] = [$value];
}
}