Nette\Forms\Controls\MultiChoiceControl::setDisabled PHP Method

setDisabled() public method

Disables or enables control or items.
public setDisabled ( $value = TRUE ) : self
return self
    public function setDisabled($value = TRUE)
    {
        if (!is_array($value)) {
            return parent::setDisabled($value);
        }
        parent::setDisabled(FALSE);
        $this->disabled = array_fill_keys($value, TRUE);
        $this->value = array_diff($this->value, $value);
        return $this;
    }