Check events against the triggered event name
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3271039. --> Reported by: [jurgenhaas](https://www.drupal.org/user/168924) Related to !95 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The method <code>\Drupal\eca\EventSubscriber\EcaBase::onEvent</code> currently handles only the event object, that's being passed on by <code>\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch</code>. That dispatcher also passes on the event name and the context.</p> <p>We should also handle the event name as the second argument, pass that on to the processor and from there to <code>\Drupal\eca\Entity\EcaStorage::loadByEvent</code> to only load those event, that really are used in models.</p> <p>Ran into that issue while implementing <a href="https://www.drupal.org/project/eca_state_machine">eca_state_machine</a> where they have one event class <code>WorkflowTransitionEvent</code> which is used with a huge variety of event names. But those event names are not included anywhere other than that second argument described above.</p> <p>I'll post a fix, shouldn't be that difficult.</p> > Related issue: [Issue #3271174](https://www.drupal.org/node/3271174) > Related issue: [Issue #3238206](https://www.drupal.org/node/3238206)
issue