Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     $this->addOption('value');
     $this->addOption('label');
     parent::configure();
     $this->setValueTransformer(new BooleanToStringTransformer());
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     // default precision is locale specific (usually around 3)
     $this->addOption('precision');
     $this->addOption('grouping', false);
     $this->addOption('rounding-mode', NumberToLocalizedStringTransformer::ROUND_HALFUP);
     parent::configure();
     $this->setValueTransformer(new NumberToLocalizedStringTransformer(array('precision' => $this->getOption('precision'), 'grouping' => $this->getOption('grouping'), 'rounding-mode' => $this->getOption('rounding-mode'))));
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     parent::configure();
     $this->addOption('max_length');
 }