deleteExtension example

$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);
    }

    public function deleteExtension(string $technicalName): void
    {
        $this->appLoader->deleteApp($technicalName);
    }

    public function activateExtension(string $technicalName, Context $context): void
    {
        $id = $this->getAppByName($technicalName$context)->getId();
        $this->appStateService->activateApp($id$context);
    }


    public function remove(string $type, string $technicalName, Context $context): void
    {
        if ($type === 'plugin') {
            $plugin = $this->pluginService->getPluginByName($technicalName$context);
            $this->pluginManagementService->deletePlugin($plugin$context);

            return;
        }

        $this->storeAppLifecycleService->deleteExtension($technicalName);
    }

    protected function getDecorated(): AbstractExtensionLifecycle
    {
        throw new DecorationPatternException(self::class);
    }
}
Home | Imprint | This part of the site doesn't use cookies.