protected function _createMultiCheckBoxElements($name, $options, $separator = null, $toggleLabel = null, $breakBeforeToggle = false)
    {
        $elements[$name] = $this->_createMultiElement('multiCheckbox', $name, $options, null);

        if (! $elements[$name]) {
            return [];
        }

        if (null === $separator) {
            $separator = ' ';
        }
        $elements[$name]->setSeparator($separator);

        if (false === $toggleLabel) {
            return $elements;
        }

        if ($breakBeforeToggle) {
            $elements['break_' . $name] = \MUtil_Html::create('br');
        }

        $tName = 'toggle_' . $name;
        $options = [
            'label'    => $toggleLabel ? $toggleLabel : $this->_('Toggle'),
            'selector' => "input[name^=$name]",
            ];
        $elements[$tName] = $this->form->createElement('ToggleCheckboxes', $tName, $options);

        return $elements;
    }
protected function _createMultiCheckBoxElements($name, $options, $separator = null, $toggleLabel = null, $breakBeforeToggle = false)
    {
        $elements[$name] = $this->_createMultiElement('multiCheckbox', $name, $options, null);

        if (! $elements[$name]) {
            return [];
        }

        if (null === $separator) {
            $separator = ' ';
        }
        $elements[$name]->setSeparator($separator);

        if (false === $toggleLabel) {
            return $elements;
        }

        if ($breakBeforeToggle) {
            $elements['break_' . $name] = \MUtil_Html::create('br');
        }

        $tName = 'toggle_' . $name;
        $options = [
            'label'    => $toggleLabel ? $toggleLabel : $this->_('Toggle'),
            'selector' => "input[name^=$name]",
            ];
        $elements[$tName] = $this->form->createElement('ToggleCheckboxes', $tName, $options);

        return $elements;
    }
protected function _createMultiCheckBoxElements ( $ name , $ options , $ separator = null , $ toggleLabel = null , $ breakBeforeToggle = false ) { $ elements [ $ name ] = $ this -> _createMultiElement ( 'multiCheckbox' , $ name , $ options , null ) ; if ( ! $ elements [ $ name ] ) { return [ ] ; } if ( null === $ separator ) { $ separator = ' ' ; } $ elements [ $ name ] -> setSeparator ( $ separator ) ; if ( false === $ toggleLabel ) { return $ elements ; } if ( $ breakBeforeToggle ) { $ elements [ 'break_' . $ name ] = \ MUtil_Html :: create ( 'br' ) ; } $ tName = 'toggle_' . $ name ; $ options = [ 'label' => $ toggleLabel ? $ toggleLabel : $ this -> _ ( 'Toggle' ) , 'selector' => "input[name^=$name]" , ] ; $ elements [ $ tName ] = $ this -> form -> createElement ( 'ToggleCheckboxes' , $ tName , $ options ) ; return $ elements ; }
Creates a \Zend_Form_Element_MultiCheckbox

If $options is a string it is assumed to contain an SQL statement.

@param string        $name    Name of the select element
@param string|array  $options Can be a SQL select string or key/value array of options
@param mixed         $separator   Optional separator string
@param string        $toggleLabel Optional text for toggle all button, when false no button is added
@param boolean       $breakBeforeToggle Enter a newline before the toggle button
@return array Of [\Zend_Form_Element_MultiCheckbox, [\MUtil_Bootstrap_Form_Element_ToggleCheckboxes]]
Creates a \ Zend_Form_Element_MultiCheckbox