AppUpdatedHook example


    public function update(Manifest $manifest, array $app, Context $context): void
    {
        $this->ensureIsCompatible($manifest);

        $defaultLocale = $this->getDefaultLocale($context);
        $metadata = $manifest->getMetadata()->toArray($defaultLocale);
        $appEntity = $this->updateApp($manifest$metadata$app['id']$app['roleId']$defaultLocale$context, false);

        $event = new AppUpdatedEvent($appEntity$manifest$context);
        $this->eventDispatcher->dispatch($event);
        $this->scriptExecutor->execute(new AppUpdatedHook($event));
    }

    /** * @param array{id: string} $app */
    public function delete(string $appName, array $app, Context $context, bool $keepUserData = false): void
    {
        $appEntity = $this->loadApp($app['id']$context);

        if ($appEntity->isActive()) {
            $this->appStateService->deactivateApp($appEntity->getId()$context);
        }
Home | Imprint | This part of the site doesn't use cookies.