public function testRenderWithGrouping() { $field = new NumberField('name', array('grouping' => true)); $field->setLocale('de_AT'); $field->setData(1234.5678); $html = '<input id="name" name="name" value="1.234,568" type="text" />'; $this->assertEquals($html, $field->render()); }
/** * {@inheritDoc} */ public function render(array $attributes = array()) { $input = parent::render($attributes); if ($this->getOption('currency')) { return str_replace('%widget%', $input, $this->getPattern($this->locale, $this->getOption('currency'))); } else { return $input; } }
/** * {@inheritDoc} */ public function render(array $attributes = array()) { return parent::render($attributes) . ' %'; }