protected function generateCheckboxByGroup($id, $label, $name, $checked, array $options)
    {
        $identifier = \sprintf('%s_%s', $name, $id);
        $key = \sprintf('%s[]', $name);
        $active = \in_array($id, (array) $checked);

        $options['id'] = $identifier;

        $control = $this->checkbox($key, $id, $active, $options);

        $label = $this->label($identifier, $label);

        return \implode(' ', [$control, $label]);
    }
protected function generateCheckboxByGroup($id, $label, $name, $checked, array $options)
    {
        $identifier = \sprintf('%s_%s', $name, $id);
        $key = \sprintf('%s[]', $name);
        $active = \in_array($id, (array) $checked);

        $options['id'] = $identifier;

        $control = $this->checkbox($key, $id, $active, $options);

        $label = $this->label($identifier, $label);

        return \implode(' ', [$control, $label]);
    }
protected function generateCheckboxByGroup ( $ id , $ label , $ name , $ checked , array $ options ) { $ identifier = \ sprintf ( '%s_%s' , $ name , $ id ) ; $ key = \ sprintf ( '%s[]' , $ name ) ; $ active = \ in_array ( $ id , ( array ) $ checked ) ; $ options [ 'id' ] = $ identifier ; $ control = $ this -> checkbox ( $ key , $ id , $ active , $ options ) ; $ label = $ this -> label ( $ identifier , $ label ) ; return \ implode ( ' ' , [ $ control , $ label ] ) ; }
Generate checkbox by group.

@param  string  $id
@param  string  $label
@param  string  $name
@param  bool|array  $checked
@param  array  $options

@return array
Generate checkbox by group .