halcyon.datasource.db.beforeUpdate
Provides an opportunity to modify records before being updated into the DB
Example usage:
$datasource->bindEvent('halcyon.datasource.db.beforeUpdate', function ((array) &$data) { // Attach a site id to every record in a multi-tenant application $data['site_id'] = SiteManager::getSite()->id; });
Usage
Triggers
Class or file | Line |
---|---|
Winter\Storm\Halcyon\Datasource\DbDatasource
|
298 |
Copyright © 2024 Winter CMS