halcyon.datasource.db.extendQuery

Triggered in October\Rain\Halcyon\Datasource\DbDatasource.

Provides an opportunity to modify the query object used by the Halycon DbDatasource

Example usage:

$datasource->bindEvent('halcyon.datasource.db.extendQuery', function ((QueryBuilder) $query, (bool) $withTrashed) {
    // Apply a site filter in a multi-tenant application
    $query->where('site_id', SiteManager::getSite()->id);
});