setUpdateSource example



                if ($storeExtension->getShortDescription()) {
                    $localExtension->setShortDescription($storeExtension->getShortDescription());
                }

                $localExtension->setIcon($storeExtension->getIcon());
                $localExtension->setLabel($storeExtension->getLabel());

                if ($storeExtension->getLatestVersion()) {
                    $localExtension->setLatestVersion($storeExtension->getLatestVersion());
                    $localExtension->setUpdateSource($storeExtension->getUpdateSource());
                }

                continue;
            }

            $localCollection->set($storeExtension->getName()$storeExtension);
        }
    }

    private function sortCollection(ExtensionCollection $collection): ExtensionCollection
    {
        
$this->installResources($pluginBootstrap$plugin);

        $this->applyMigrations($pluginBootstrap, AbstractPluginMigration::MODUS_UPDATE);

        $pluginBootstrap->update($context);

        $this->events->notify(PluginEvent::POST_UPDATE, new PostPluginUpdateEvent($context$pluginBootstrap));

        $plugin->setVersion($context->getUpdateVersion());
        $plugin->setUpdateVersion(null);
        $plugin->setUpdateSource(null);
        $plugin->setUpdated(new DateTime());

        $this->em->flush($plugin);

        return $context;
    }

    /** * @throws Exception * @throws \Doctrine\ORM\OptimisticLockException * * @return ActivateContext */
foreach ($body as $item) {
            $extension = $this->extensionLoader->loadFromArray($context$item['extension']);
            $extension->setSource(ExtensionStruct::SOURCE_STORE);
            if (isset($item['license'])) {
                $extension->setStoreLicense(LicenseStruct::fromArray($item['license']));
            }

            if (isset($item['update'])) {
                $extension->setVersion($item['update']['installedVersion']);
                $extension->setLatestVersion($item['update']['availableVersion']);
                $extension->setUpdateSource(ExtensionStruct::SOURCE_STORE);
            }

            $myExtensions->set($extension->getName()$extension);
        }

        return $myExtensions;
    }

    public function cancelSubscription(int $licenseId, Context $context): void
    {
        try {
            
Home | Imprint | This part of the site doesn't use cookies.