Skip to content

pbOnGetListBlocks

Triggers when retrieving the list of blocks.

Parameters

ParameterDescription
arrayArray of rows

Examples


php
if ($modx->event->name === 'pbOnGetListBlocks') {
    if ($parent_id === 12 && $type === 'pbBlock') {
        $modx->event->params['array'] = array_filter($array, function($block){
            return $block['name'] !== 'Gallery';
        });
    }
}

© PageBlocks 2019-present