Allow multiple subjects of the same type

[MAILPOET-4465]
This commit is contained in:
Jan Jakes
2022-07-05 13:23:13 +02:00
committed by Veljko V
parent aaf8cb5d51
commit 494cc7b780
5 changed files with 40 additions and 21 deletions

View File

@ -55,8 +55,8 @@ class TriggerHandler {
// ensure subjects are registered and loadable
$loadedSubjects = [];
foreach ($subjects as $key => $args) {
$loadedSubjects[] = $this->subjectLoader->loadSubject($key, $args);
foreach ($subjects as $subject) {
$loadedSubjects[] = $this->subjectLoader->loadSubject($subject['key'], $subject['args']);
}
$workflowRun = new WorkflowRun($workflow->getId(), $trigger->getKey(), $loadedSubjects);