public function checkboxGroup($name, $options, $selected = null, $htmlOptions = [], $template = '<input><label>', $separator = '<br />')
    {
        if (is_null($selected)) {
            $selected = $this->getArrayValue($_POST, $name);
            if (is_null($selected)) {
                $selected = $this->getArrayValue($_GET, $name);
            }
        }
        $r = array();
        foreach ($options as $value => $label) {
            $r[] = $this->checkbox($name . '[]', $label, $value, is_array($selected) ? in_array($value, $selected) : $selected == $value, $htmlOptions, $template);
        }
        return implode($separator, $r);
    }
public function checkboxGroup($name, $options, $selected = null, $htmlOptions = [], $template = '<input><label>', $separator = '<br />')
    {
        if (is_null($selected)) {
            $selected = $this->getArrayValue($_POST, $name);
            if (is_null($selected)) {
                $selected = $this->getArrayValue($_GET, $name);
            }
        }
        $r = array();
        foreach ($options as $value => $label) {
            $r[] = $this->checkbox($name . '[]', $label, $value, is_array($selected) ? in_array($value, $selected) : $selected == $value, $htmlOptions, $template);
        }
        return implode($separator, $r);
    }
public function checkboxGroup ( $ name , $ options , $ selected = null , $ htmlOptions = [ ] , $ template = '<input><label>' , $ separator = '<br />' ) { if ( is_null ( $ selected ) ) { $ selected = $ this -> getArrayValue ( $ _POST , $ name ) ; if ( is_null ( $ selected ) ) { $ selected = $ this -> getArrayValue ( $ _GET , $ name ) ; } } $ r = array ( ) ; foreach ( $ options as $ value => $ label ) { $ r [ ] = $ this -> checkbox ( $ name . '[]' , $ label , $ value , is_array ( $ selected ) ? in_array ( $ value , $ selected ) : $ selected == $ value , $ htmlOptions , $ template ) ; } return implode ( $ separator , $ r ) ; }
Generate a group of checkbox inputs
@param string $name
@param array $options
@param null $selected
@param array $htmlOptions
@param string $template
@param string $separator
@return string
Generate a group of checkbox inputs