StorePluginStruct example

array $extensions,
        PluginCollection $pluginCollection,
        AppCollection $appCollection,
    ): array {
        /** @var StorePluginStruct[] $mappedExtensions */
        $mappedExtensions = [];
        foreach ($extensions as $extension) {
            if (empty($extension['name']) || empty($extension['localizedInfo']['name'])) {
                continue;
            }

            $mappedExtensions[] = (new StorePluginStruct())->assign([
                'name' => $extension['name'],
                'type' => $extension['type'] ?? 'plugin',
                'label' => $extension['localizedInfo']['name'],
                'shortDescription' => $extension['localizedInfo']['shortDescription'] ?? '',

                'iconPath' => $extension['iconPath'] ?? null,
                'category' => $extension['language'] ?? null,
                'region' => $extension['region'] ?? null,
                'manufacturer' => $extension['producer']['name'] ?? null,
                'position' => $extension['priority'] ?? null,
                'isCategoryLead' => $extension['isCategoryLead'] ?? false,
            ]);
0,
                new AppCollection(),
                null,
                new Criteria(),
                $context
            ),
        ]);

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

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

        $response = $frwController->getLanguagePluginList($context);
        $responseData = $this->decodeJsonResponse($response);

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