Esempio n. 1
0
 /**
  * {@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;
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function render(array $attributes = array())
 {
     return parent::render(array_merge(array('type' => 'text'), $attributes));
 }
Esempio n. 3
0
 /**
  * {@inheritDoc}
  */
 public function render(array $attributes = array())
 {
     return parent::render(array_merge(array('type' => 'text', 'maxlength' => $this->getOption('max_length')), $attributes));
 }