pbOnBeforeGetList
Triggers before generating the grid of a block or table
Parameters
| Parameter | Description |
|---|---|
| type | Type: pbBlock|pbTable |
| where | Array of conditions |
Examples
Do not display unpublished objects.
php
if ($modx->event->name === 'pbOnBeforeGetList') {
if ($modx->user->id > 1) {
$where['published'] = 1;
$modx->event->params['where'] = $where;
}
}