/** * Register a new Label with this form, renders it and return the HTML code */ public function registerAndRenderLabel(Label $label, $inputId = false) { if ($inputId) { if (isset($this->inputs[$inputId])) { $label->setInput($this->inputs[$inputId]); } else { throw new ConfigurationException(sprintf('Trying to add a label to an input that hasn\'t been added yet: %s', $inputId)); } } return $label->render(); }
public function __construct(array $attributes, $content) { parent::__construct($attributes); $this->content = $content; }