projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9db0364
)
Load the API kernel service prior to dispatching the `civi.api4.createRequest` event...
author
Jens Schuppe
<schuppe@systopia.de>
Fri, 15 Oct 2021 12:23:51 +0000
(14:23 +0200)
committer
Jens Schuppe
<schuppe@systopia.de>
Fri, 15 Oct 2021 12:23:51 +0000
(14:23 +0200)
Civi/API/Request.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/API/Request.php
b/Civi/API/Request.php
index 4c9a6d5fc0a9418eb6a97d8ec3f1199017c36256..65d5c280353b9d76edf2f281a988edf7de9bdade 100644
(file)
--- a/
Civi/API/Request.php
+++ b/
Civi/API/Request.php
@@
-45,6
+45,10
@@
class Request {
];
case 4:
+ // Load the API kernel service for registering API providers, as
+ // otherwise subscribers to the civi.api4.createRequest event registered
+ // through the EventSubscriberInterface will not be registered.
+ $kernel = \Civi::service('civi_api_kernel');
$e = new CreateApi4RequestEvent($entity);
\Civi::dispatcher()->dispatch('civi.api4.createRequest', $e);
$callable = [$e->className, $action];