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