attributes->withAdditional(['type' => 'email']); $attrArray = $attrs->toArray(); if ($this->value !== null && $this->value !== '') { $attrArray['value'] = (string) $this->value; } $input = FormElement::create('input', $attrArray); $wrapped = $this->wrapper->wrap($input, $this->metadata); return $form->addElement($wrapped); } public function getName(): string { return $this->metadata->name; } public function getValue(): mixed { return $this->value; } public function getLabel(): string { return $this->metadata->label; } }