PluginRecommendationCollection example



    public function getRecommendations(
        PluginCollection $pluginCollection,
        AppCollection $appCollection,
        ?string $region,
        ?string $category,
        Context $context
    ): PluginRecommendationCollection {
        $recommendations = $this->frwClient->getRecommendations($region$category$context);

        return new PluginRecommendationCollection(
            $this->mapExtensionData($recommendations$pluginCollection$appCollection)
        );
    }

    public function getLicenseDomains(Context $context): LicenseDomainCollection
    {
        $licenseDomains = $this->frwClient->getLicenseDomains($context);

        $currentLicenseDomain = $this->configService->getString(StoreService::CONFIG_KEY_STORE_LICENSE_DOMAIN);
        $currentLicenseDomain = $currentLicenseDomain ? idn_to_utf8($currentLicenseDomain) : null;

        
AppEntity::class,
                0,
                new AppCollection(),
                null,
                new Criteria(),
                $context
            ),
        ]);

        $this->firstRunWizardService->expects(static::once())
            ->method('getRecommendations')
            ->willReturn(new PluginRecommendationCollection([
                (new StorePluginStruct())->assign(['name' => $plugin1Name]),
            ]));

        $frwController = new FirstRunWizardController(
            $this->firstRunWizardService,
            $pluginRepository,
            $appRepository,
        );

        $response = $frwController->getRecommendations(new SymfonyRequest()$context);
        $responseData = $this->decodeJsonResponse($response);

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