Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This is a minor nit ... but I just want to clear it up.
foreach ($entities as $entity) {
\Drupal::service('event_dispatcher')
->dispatch(FlagEvents::FLAG_DELETED, new FlagDeleteEvent($entity));
}
if the number of $entities is large the number of redundant calls to service('event_displatcher') will start to show.
Comment | File | Size | Author |
---|---|---|---|
event-1.patch | 620 bytes | martin107 | |
|
Comments
Comment #2
socketwench CreditAttribution: socketwench as a volunteer commentedGood catch!
Comment #3
joachim CreditAttribution: joachim commentedThanks!