src/FormLayout/BootstrapFormLayoutFactory.php
private function buildFallbackConfig(string $type, array $config): array
    {
        $type           = substr($type, 3);
        $fallbackConfig = $this->environment->getConfig()->get('form.layouts.' . $type, []);
        $fallbackConfig = ArrayUtil::merge($this->fallbackConfig, $fallbackConfig);

        foreach ($this->sections as $section) {
            $name = 'fallback' . ucfirst($section);

            if ($config[$name]) {
                $fallbackConfig['templates'][$section] = $config[$name];
            }
        }

        return $fallbackConfig;
    }
private function buildFallbackConfig(string $type, array $config): array
    {
        $type           = substr($type, 3);
        $fallbackConfig = $this->environment->getConfig()->get('form.layouts.' . $type, []);
        $fallbackConfig = ArrayUtil::merge($this->fallbackConfig, $fallbackConfig);

        foreach ($this->sections as $section) {
            $name = 'fallback' . ucfirst($section);

            if ($config[$name]) {
                $fallbackConfig['templates'][$section] = $config[$name];
            }
        }

        return $fallbackConfig;
    }
private function buildFallbackConfig ( string $ type , array $ config ) : array { $ type = substr ( $ type , 3 ) ; $ fallbackConfig = $ this -> environment -> getConfig ( ) -> get ( 'form.layouts.' . $ type , [ ] ) ; $ fallbackConfig = ArrayUtil :: merge ( $ this -> fallbackConfig , $ fallbackConfig ) ; foreach ( $ this -> sections as $ section ) { $ name = 'fallback' . ucfirst ( $ section ) ; if ( $ config [ $ name ] ) { $ fallbackConfig [ 'templates' ] [ $ section ] = $ config [ $ name ] ; } } return $ fallbackConfig ; }
Build the fallback config.

@param string $type   Layout type.
@param array  $config Configuration.

@return array
Build the fallback config .