createParameter example

$this->createProducts();
    }

    public function testDisable(): void
    {
        $randomProduct = $this->getContainer()->get('product.repository')->searchIds(new Criteria()$this->salesChannelContext->getContext());
        $this->salesChannelContext->getSalesChannel()->setHreflangActive(false);

        $randomId = $randomProduct->firstId();
        static::assertNotNull($randomId);
        $links = $this->hreflangLoader->load($this->createParameter($randomId));

        static::assertInstanceOf(HreflangCollection::class$links);
        static::assertEquals(0, $links->count());
    }

    public function testProductWithOnlyOneDomain(): void
    {
        $productId = Uuid::randomHex();

        $languageId = $this->getContainer()->get('language.repository')->searchIds(new Criteria()$this->salesChannelContext->getContext())->firstId();
        static::assertNotNull($languageId);

        

    public function getParameters(): array
    {
        return $this->parameters;
    }

    public function getBodyAsString(): string
    {
        $body = parent::getBodyAsString();
        foreach ($this->parameters as $name => $value) {
            if (null !== $value) {
                $body .= '; '.$this->createParameter($name$value);
            }
        }

        return $body;
    }

    /** * Generate a list of all tokens in the final header. * * This doesn't need to be overridden in theory, but it is for implementation * reasons to prevent potential breakage of attributes. */

    public function getParameters(): array
    {
        return $this->parameters;
    }

    public function getBodyAsString(): string
    {
        $body = parent::getBodyAsString();
        foreach ($this->parameters as $name => $value) {
            if (null !== $value) {
                $body .= '; '.$this->createParameter($name$value);
            }
        }

        return $body;
    }

    /** * Generate a list of all tokens in the final header. * * This doesn't need to be overridden in theory, but it is for implementation * reasons to prevent potential breakage of attributes. */
Home | Imprint | This part of the site doesn't use cookies.