getTechnicalNames example

/** * @throws Exception * * @return PluginStruct[] */
    public function getPlugins(PluginsByTechnicalNameRequest $context)
    {
        $query = $this->getQuery();
        $query->andWhere('plugin.name IN (:names)')
            ->setParameter(
                ':names',
                $context->getTechnicalNames(),
                Connection::PARAM_STR_ARRAY
            );

        $statement = $query->execute();

        $data = $statement->fetchAll(PDO::FETCH_ASSOC);

        return $this->iteratePlugins($data$context);
    }

    /** * @return array<string, string> indexed by technical name, value contains the version */
return array_shift($plugins);
    }

    /** * @return PluginStruct[] */
    public function getPlugins(PluginsByTechnicalNameRequest $context)
    {
        $params = [
            'locale' => $context->getLocale(),
            'shopwareVersion' => $context->getShopwareVersion(),
            'technicalNames' => $context->getTechnicalNames(),
        ];

        $data = $this->storeClient->doGetRequest(
            '/pluginStore/pluginsByName',
            $params
        );

        return $this->hydrator->hydrateStorePlugins($data);
    }

    /** * @throws Exception * * @return UpdateResultStruct */
/** * @return array */
    public function getPlugins(PluginsByTechnicalNameRequest $context)
    {
        $localePlugins = $this->localPluginService->getPlugins($context);

        $storePlugins = $this->storePluginService->getPlugins($context);

        $result = [];
        foreach ($context->getTechnicalNames() as $name) {
            $name = strtolower($name);
            $storePlugin = null;
            $localPlugin = null;

            if (\array_key_exists($name$localePlugins)) {
                $localPlugin = $localePlugins[$name];
            }

            if (\array_key_exists($name$storePlugins)) {
                $storePlugin = $storePlugins[$name];
            }

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