setValue() public method

Sets control's value.
public setValue ( $value ) : self
return self
Exemplo n.º 1
0
 /**
  * @param  DateTime|string|NULL  $value
  * @return static
  */
 public function setValue($value = NULL)
 {
     if ($value instanceof \DateTime) {
         $value = $value->format($this->format);
     }
     return parent::setValue($value);
 }
 public function setValue($value)
 {
     return parent::setValue($value instanceof DateTime ? $value->format($this->htmlFormat) : $value);
 }
Exemplo n.º 3
0
 /**
  * Is a control's value float number?
  * @return bool
  * @internal
  */
 public static function validateFloat(TextBase $control)
 {
     $value = self::filterFloat($control->getValue());
     if (Validators::isNumeric($value)) {
         $control->setValue((double) $value);
         return TRUE;
     }
     return FALSE;
 }