public setAttribute ( $name, $value = TRUE ) : self | ||
return | self |
public function setAttribute($name, $value = TRUE)
{
$this->control->{$name} = $value;
return $this;
}
/** * @param Nette\Forms\Controls\BaseControl $input * @return Nette\Forms\Controls\BaseControl */ protected function addAttributes($input) { if ($this->grid->hasAutoSubmit()) { $input->setAttribute('data-autosubmit', TRUE); } else { $input->setAttribute('data-datagrid-manualsubmit', TRUE); } foreach ($this->attributes as $attribute) { $input->setAttribute($attribute[0], $attribute[1]); } return $input; }