@@ 60-66 (lines=7) @@ | ||
57 | private function renderElement(FormElementInterface $element, $options) |
|
58 | { |
|
59 | switch ($element->getType()) { |
|
60 | case FormElementInterface::TYPE_TEXTAREA: |
|
61 | return sprintf('<textarea name="%s" class="%s" %s>%s</textarea>', |
|
62 | $element->getName(), |
|
63 | $element->hasError() ? 'error' : '', |
|
64 | $this->formatOptions($element->getOptions()), |
|
65 | $element->getValue() |
|
66 | ); |
|
67 | ||
68 | case FormElementInterface::TYPE_SELECT: |
|
69 | /** @var Select $select */ |
|
@@ 79-86 (lines=8) @@ | ||
76 | ||
77 | return $html; |
|
78 | ||
79 | default: |
|
80 | return sprintf('<input type="%s" class="%s" name="%s" value="%s" %s />', |
|
81 | $element->getType(), |
|
82 | ' flat ' . ($element->hasError() ? 'error' : ''), |
|
83 | $element->getName(), |
|
84 | $element->getValue(), |
|
85 | $this->formatOptions($element->getOptions()) |
|
86 | ); |
|
87 | } |
|
88 | } |
|
89 |