/**
     * @param Form $form
     * @return string
     */
    public function render(Form $form)
    {
        $formHtml = '<form action="?send" method="' . $form->getMethod() . '">';
        foreach ($form->getComponents() as $component) {
            /** @var Component $component */
            $formHtml .= $component->render();
        }
        $formHtml .= '
			<div class="submit">
				<input type="submit" value="' . $this->submitLabel . '">
			</div>
		</form>';
        return $formHtml;
    }
Exemple #2
0
 public function addComponent(Component $component)
 {
     if ($component instanceof Field) {
         $component->setFieldComponentRenderer($this->defaultFieldComponentRenderer);
     }
     parent::addComponent($component);
 }