/** * {@inheritDoc} */ public function render(array $attributes = array()) { $html = parent::render(array_merge(array('value' => $this->getOption('value'), 'checked' => (string) $this->getDisplayedData() !== '' && $this->getDisplayedData() !== 0), $attributes)); if ($label = $this->getOption('label')) { if ($this->getOption('translate_label')) { $label = $this->translate($label); } $html .= ' ' . $this->generator->contentTag('label', $label, array('for' => $this->getId())); } return $html; }
/** * {@inheritDoc} */ public function render(array $attributes = array()) { return parent::render(array_merge(array('type' => 'text'), $attributes)); }
/** * {@inheritDoc} */ public function render(array $attributes = array()) { return parent::render(array_merge(array('type' => 'text', 'maxlength' => $this->getOption('max_length')), $attributes)); }