setDefaultValue() public method

Sets control's default value.
public setDefaultValue ( $value ) : self
return self
Example #1
0
 public function setDefaultValue($value)
 {
     parent::setDefaultValue($value);
     if (is_array($this->disabled) && !is_array($value)) {
         $key = key(array($value => NULL));
         if (isset($this->disabled[$key]) && $this->value === NULL) {
             $this->value = $key;
         }
     }
     return $this;
 }