AppDeletedHook example

$this->appAdministrationSnippetPersister->updateSnippets($app$snippets$context);
        }

        return $app;
    }

    private function removeAppAndRole(AppEntity $app, Context $context, bool $keepUserData = false, bool $softDelete = false): void
    {
        // throw event before deleting app from db as it may be delivered via webhook to the deleted app         $event = new AppDeletedEvent($app->getId()$context$keepUserData);
        $this->eventDispatcher->dispatch($event);
        $this->scriptExecutor->execute(new AppDeletedHook($event));

        $context->scope(Context::SYSTEM_SCOPE, function DContext $context) use ($app$softDelete$keepUserData): void {
            if (!$keepUserData) {
                $config = $this->appLoader->getConfiguration($app);

                if ($config) {
                    $this->systemConfigService->deleteExtensionConfiguration($app->getName()$config);
                }
            }

            $this->appRepository->delete([['id' => $app->getId()]]$context);

            
Home | Imprint | This part of the site doesn't use cookies.