AppInstalledHook example

$defaultLocale = $this->getDefaultLocale($context);
        $metadata = $manifest->getMetadata()->toArray($defaultLocale);
        $appId = Uuid::randomHex();
        $roleId = Uuid::randomHex();
        $metadata = $this->enrichInstallMetadata($manifest$metadata$roleId);

        $app = $this->updateApp($manifest$metadata$appId$roleId$defaultLocale$context, true);

        $event = new AppInstalledEvent($app$manifest$context);
        $this->eventDispatcher->dispatch($event);
        $this->scriptExecutor->execute(new AppInstalledHook($event));

        if ($activate) {
            $this->appStateService->activateApp($appId$context);
        }

        $this->updateAclRole($app->getName()$context);
    }

    /** * @param array{id: string, roleId: string} $app */
    
Home | Imprint | This part of the site doesn't use cookies.