/**
  * Construct new input field for: splits
  * 
  * WARNING: This class was used with @code new TrainingInputSplits([$value]); @endcode previously.
  * To be used in a standard formular created by a database scheme,
  * this class has to use the default constructor for a FormularField again:
  * @code new TrainingInputSplits($name, $label [, $value]); @endcode
  * 
  * @param string $name
  * @param string $label
  * @param string $value [optional]
  */
 public function __construct($name = '', $label = '', $value = '')
 {
     if ($label == '') {
         parent::__construct('splits', __('Laps'), $name);
     } else {
         parent::__construct($name, $label, $value);
     }
     $this->setLayout(FormularFieldset::$LAYOUT_FIELD_W100_IN_W50);
     $this->addAttribute('class', FormularInput::$SIZE_FULL_INLINE);
     $this->setParser(FormularValueParser::$PARSER_SPLITS);
 }
Exemplo n.º 2
0
 /**
  * Construct a new field
  * @param string $name
  * @param string $label
  * @param string $value optional, default: loading from $_POST
  */
 public function __construct($name, $label, $value = '')
 {
     parent::__construct($name, $label, $value);
     $this->setParser(FormularValueParser::$PARSER_BOOL);
 }