I wrote a form view helper, that extends the Zend\\Form\\View\\Helper\\FormMultiCheckbox
and overwrites its renderOptions(...) method:
here's an example of overriding a view helper:
http://ctrl-f5.net/php/zf2-servicemanager-custom-viewhelpers/
Example:
class Module {
public function onBootstrap(MvcEvent $mvcEvent)
{
$application = $mvcEvent->getApplication();
$serviceManager = $application->getServiceManager();
$viewHelperManager = $serviceManager->get('ViewHelperManager');
$viewHelperManager->setInvokableClass('formmulticheckbox', 'MyNamespace\Form\View\Helper\FormMultiCheckbox');
}
...
}
Although Andrews answer works, it's not necessary, just use the default view helper name and map it to your helper class, the application will then use your helper instead
public function getViewHelperConfig() {
return array(
'invokables' => array(
'formmulticheckbox' => 'MyNamespace\Form\View\Helper\FormMultiCheckbox',
),
);
}