halcyon.datasource.db.extendQuery

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) $ignoreDeleted) { // Apply a site filter in a multi-tenant application $query->where('site_id', SiteManager::getSite()->id); });

Usage

Triggers

Copyright © 2024 Winter CMS