$this->webhooks = null;
} public function clearInternalPrivilegesCache(): void
{ $this->privileges =
[];
} private function callWebhooks(Hookable
$event, Context
$context): void
{ /** @var WebhookCollection $webhooksForEvent */
$webhooksForEvent =
$this->
getWebhooks()->
filterForEvent($event->
getName());
if ($webhooksForEvent->
count() === 0
) { return;
} $affectedRoleIds =
$webhooksForEvent->
getAclRoleIdsAsBinary();
$languageId =
$context->
getLanguageId();
$userLocale =
$this->
getAppLocaleProvider()->
getLocaleFromContext($context);
// If the admin worker is enabled we send all events synchronously, as we can't guarantee timely delivery otherwise.
// Additionally, all app lifecycle events are sent synchronously as those can lead to nasty race conditions otherwise.