private function convertChildren($array, $result)
    {
        if (isset($array['children'])) {
            foreach ($array['children'] as $key => $value) {
                $result['children'][$key] = $this->convertField($value);
                if (isset($result['children'][$key]['required'])) {
                    $result['required'] = $result['required'] || (bool) $result['children'][$key]['required'];
                }
            }

            return $result;
        }

        return $result;
    }
private function convertChildren($array, $result)
    {
        if (isset($array['children'])) {
            foreach ($array['children'] as $key => $value) {
                $result['children'][$key] = $this->convertField($value);
                if (isset($result['children'][$key]['required'])) {
                    $result['required'] = $result['required'] || (bool) $result['children'][$key]['required'];
                }
            }

            return $result;
        }

        return $result;
    }
private function convertChildren ( $ array , $ result ) { if ( isset ( $ array [ 'children' ] ) ) { foreach ( $ array [ 'children' ] as $ key => $ value ) { $ result [ 'children' ] [ $ key ] = $ this -> convertField ( $ value ) ; if ( isset ( $ result [ 'children' ] [ $ key ] [ 'required' ] ) ) { $ result [ 'required' ] = $ result [ 'required' ] || ( bool ) $ result [ 'children' ] [ $ key ] [ 'required' ] ; } } return $ result ; } return $ result ; }
Convert the children key of an array.

@param array $array  The source array.

@param array $result The partly converted array.

@return array
Convert the children key of an array .