protected function buildCheckableChildren($fieldType)
    {
        $multiple = $this->getOption('multiple') ? '[]' : '';

        foreach ((array)$this->options['choices'] as $key => $choice) {
            $id = str_replace('.', '_', $this->getNameKey()) . '_' . $key;
            $options = $this->formHelper->mergeOptions(
                $this->getOption('choice_options'),
                [
                    'attr'       => ['id' => $id],
                    'label_attr' => ['for' => $id],
                    'label'      => $this->formHelper->formatLabel($choice),
                    'checked'    => in_array($key, (array)$this->options[$this->valueProperty]),
                    'value'      => $key
                ]
            );
            $this->children[] = new $fieldType(
                $this->name . $multiple,
                $this->choiceType,
                $this->parent,
                $options
            );
        }
    }
protected function buildCheckableChildren($fieldType)
    {
        $multiple = $this->getOption('multiple') ? '[]' : '';

        foreach ((array)$this->options['choices'] as $key => $choice) {
            $id = str_replace('.', '_', $this->getNameKey()) . '_' . $key;
            $options = $this->formHelper->mergeOptions(
                $this->getOption('choice_options'),
                [
                    'attr'       => ['id' => $id],
                    'label_attr' => ['for' => $id],
                    'label'      => $this->formHelper->formatLabel($choice),
                    'checked'    => in_array($key, (array)$this->options[$this->valueProperty]),
                    'value'      => $key
                ]
            );
            $this->children[] = new $fieldType(
                $this->name . $multiple,
                $this->choiceType,
                $this->parent,
                $options
            );
        }
    }
protected function buildCheckableChildren ( $ fieldType ) { $ multiple = $ this -> getOption ( 'multiple' ) ? '[]' : '' ; foreach ( ( array ) $ this -> options [ 'choices' ] as $ key => $ choice ) { $ id = str_replace ( '.' , '_' , $ this -> getNameKey ( ) ) . '_' . $ key ; $ options = $ this -> formHelper -> mergeOptions ( $ this -> getOption ( 'choice_options' ) , [ 'attr' => [ 'id' => $ id ] , 'label_attr' => [ 'for' => $ id ] , 'label' => $ this -> formHelper -> formatLabel ( $ choice ) , 'checked' => in_array ( $ key , ( array ) $ this -> options [ $ this -> valueProperty ] ) , 'value' => $ key ] ) ; $ this -> children [ ] = new $ fieldType ( $ this -> name . $ multiple , $ this -> choiceType , $ this -> parent , $ options ) ; } }
Build checkable children fields from choice type

@param string $fieldType
Build checkable children fields from choice type