Skip to content

pbOnAfterGetList

Triggers after generating the grid of a block or table

Parameters

ParameterDescription
typeType: pbBlock|pbTable
arrayArray of rows

Examples


Delete all actions.

php
if ($modx->event->name === 'pbOnAfterGetList') {
    if ($modx->user->id > 1) {
        $array = array_map(function($item) use ($modx){
            $item['actions'] = '';
            return $item;
        }, $array);
        $modx->event->params['array'] = $array;
    }
}

© PageBlocks 2019-present