Nette\Forms\Controls\Checkbox::setValue PHP Method

setValue() public method

Sets control's value.
public setValue ( $value ) : self
return self
    public function setValue($value)
    {
        if (!is_scalar($value) && $value !== NULL) {
            throw new Nette\InvalidArgumentException(sprintf("Value must be scalar or NULL, %s given in field '%s'.", gettype($value), $this->name));
        }
        $this->value = (bool) $value;
        return $this;
    }