validateExtensionCanBeRemoved example

$this->appLifecycle->install($manifests[$technicalName], false, $context);
    }

    public function uninstallExtension(string $technicalName, Context $context, bool $keepUserData = false): void
    {
        try {
            $app = $this->getAppByName($technicalName$context);
        } catch (ExtensionNotFoundException) {
            return;
        }

        $this->validateExtensionCanBeRemoved($technicalName$app->getId()$context);
        $this->appLifecycle->delete($technicalName['id' => $app->getId(), 'roleId' => $app->getAclRoleId()]$context$keepUserData);
    }

    public function removeExtensionAndCancelSubscription(int $licenseId, string $technicalName, string $id, Context $context): void
    {
        $this->validateExtensionCanBeRemoved($technicalName$id$context);
        $app = $this->getAppById($id$context);
        $this->storeClient->cancelSubscription($licenseId$context);
        $this->appLifecycle->delete($technicalName['id' => $id, 'roleId' => $app->getAclRoleId()]$context);
        $this->deleteExtension($technicalName);
    }

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