backgroundSettings->shouldProcessColumnChangeInBackground(); $event = new AddColumnEvent($leadField, $shouldProcessInBackground); $this->dispatcher->dispatch($event, LeadEvents::LEAD_FIELD_PRE_ADD_COLUMN); if ($shouldProcessInBackground) { throw new AbortColumnCreateException('Column change will be processed in background job'); } } /** * @throws AbortColumnUpdateException */ public function dispatchPreUpdateColumnEvent(LeadField $leadField): void { $shouldProcessInBackground = $this->backgroundSettings->shouldProcessColumnChangeInBackground(); $event = new UpdateColumnEvent($leadField, $shouldProcessInBackground); $this->dispatcher->dispatch($event, LeadEvents::LEAD_FIELD_PRE_UPDATE_COLUMN); if ($event->shouldProcessInBackground()) { throw new AbortColumnUpdateException('Column change will be processed in background job'); } } }