\Nette\Forms\Controls\Checkbox::getControl returns label part and control part like one \Nette\Utils\Html and then $control->getControl()->getAttribute('class') is always null (because it takes class from label) and custom defined classes are always overwritten by $control->setAttribute('class', 'form-control input-sm form-control-sm');
fixed by using \Nette\Forms\Controls\BaseControl::getControlPrototype which always returns only control part without label part
\Nette\Forms\Controls\Checkbox::getControl
returns label part and control part like one\Nette\Utils\Html
and then$control->getControl()->getAttribute('class')
is always null (because it takes class from label) and custom defined classes are always overwritten by$control->setAttribute('class', 'form-control input-sm form-control-sm');
\Nette\Forms\Controls\BaseControl::getControlPrototype
which always returns only control part without label part