Info example


        parent::registerPlugin($plugin);

        if ($refreshDate === null) {
            $refreshDate = new DateTimeImmutable();
        }

        if (!\is_string($plugin->getName())) {
            throw new RuntimeException('Plugin name not initialized correctly');
        }

        $info = $plugin->Info();
        $capabilities = $plugin->getCapabilities();
        $id = $this->getPluginId($plugin->getName());

        // normalize autor -> author         if (isset($info['autor'])) {
            $info['author'] = $info['autor'];
        }

        $data = [
            'namespace' => $this->getName(),
            'name' => $plugin->getName(),
            
private function createServers(string $api): array
    {
        $url = (string) EnvironmentHelper::getVariable('APP_URL', '');

        return [
            new Server(['url' => rtrim($url, '/') . self::API[$api]['url']]),
        ];
    }

    private function createInfo(string $api, string $version): Info
    {
        return new Info([
            'title' => 'Shopware ' . self::API[$api]['name'],
            'version' => $version,
            'description' => <<<'EOF' This endpoint reference contains an overview of all endpoints comprising the Shopware Admin API. For a better overview, all CRUD-endpoints are hidden by default. If you want to show also CRUD-endpoints add the query parameter `type=jsonapi`. EOF
        ]);
    }

    
return false;
        }

        return version_compare($updateVersion$currentVersion, '>');
    }

    /** * @return bool|array<string, bool|string[]> */
    public function install()
    {
        return !empty($this->Info()->get('capabilities')['install']);
    }

    /** * @return bool|array<string, bool|string[]> */
    public function uninstall()
    {
        return !empty($this->Info()->get('capabilities')['install']);
    }

    /** * @return bool|array<string, bool|string[]> */
Home | Imprint | This part of the site doesn't use cookies.