InputField example

$action = $actions->getElementsByTagName('flow-action')->item(0);

        $this->config = $action->getElementsByTagName('config')->item(0);
    }

    public function testFromXml(): void
    {
        static::assertNotNull($this->config);
        /** @var \DOMElement $inputField */
        $inputField = $this->config->getElementsByTagName('input-field')->item(0);

        $expectedInputField = new InputField([
            'name' => 'textField',
            'label' => [
                'en-GB' => 'To',
                'de-DE' => 'To DE',
            ],
            'required' => true,
            'defaultValue' => 'Shopware 6',
            'placeHolder' => [
                'en-GB' => 'Enter to...',
                'de-DE' => 'Enter to DE...',
            ],
            
$actions = $this->document->getElementsByTagName('flow-actions')->item(0);
        /** @var \DOMElement $action */
        $action = $actions->getElementsByTagName('flow-action')->item(0);
        /** @var \DOMElement $meta */
        $meta = $action->getElementsByTagName('meta')->item(0);

        $meta = Metadata::fromXml($meta);

        $parameter = new Parameter(['id' => 'key']);
        $this->parameters = new Parameters([$parameter]);
        $this->headers = new Headers([$parameter]);
        $inputFiled = new InputField(['id' => 'key']);
        $this->config = new Config([$inputFiled]);

        $this->action = new Action([
            'meta' => $meta,
            'headers' => $this->headers,
            'parameters' => $this->parameters,
            'config' => $this->config,
        ]);
    }

    public function testToArray(): void
    {
Home | Imprint | This part of the site doesn't use cookies.