private function configureTwigBundle(ContainerBuilder $container)
    {
        // Get the twig configurations.
        $name    = 'twig';
        $configs = $container->getExtensionConfig($name);

        // Find any existing configurations and add to it them so when the
        // configs are merged they do not overwrite each other.
        foreach ($configs as $config) {
            if (isset($config['form_themes'])) {
                $formConfig = ['form_themes' => $config['form_themes']];
            }
        }

        // Update or create the configuration.
        if (!empty($formConfig)) {
            $formConfig['form_themes'][] = $this->formTemplate;
        } else {
            $formConfig = [
                'form_themes' => [$this->formTemplate],
            ];
        }

        // Prepend our configuration.
        $container->prependExtensionConfig($name, $formConfig);
    }
private function configureTwigBundle(ContainerBuilder $container)
    {
        // Get the twig configurations.
        $name    = 'twig';
        $configs = $container->getExtensionConfig($name);

        // Find any existing configurations and add to it them so when the
        // configs are merged they do not overwrite each other.
        foreach ($configs as $config) {
            if (isset($config['form_themes'])) {
                $formConfig = ['form_themes' => $config['form_themes']];
            }
        }

        // Update or create the configuration.
        if (!empty($formConfig)) {
            $formConfig['form_themes'][] = $this->formTemplate;
        } else {
            $formConfig = [
                'form_themes' => [$this->formTemplate],
            ];
        }

        // Prepend our configuration.
        $container->prependExtensionConfig($name, $formConfig);
    }
private function configureTwigBundle ( ContainerBuilder $ container ) { // Get the twig configurations. $ name = 'twig' ; $ configs = $ container -> getExtensionConfig ( $ name ) ; // Find any existing configurations and add to it them so when the // configs are merged they do not overwrite each other. foreach ( $ configs as $ config ) { if ( isset ( $ config [ 'form_themes' ] ) ) { $ formConfig = [ 'form_themes' => $ config [ 'form_themes' ] ] ; } } // Update or create the configuration. if ( ! empty ( $ formConfig ) ) { $ formConfig [ 'form_themes' ] [ ] = $ this -> formTemplate ; } else { $ formConfig = [ 'form_themes' => [ $ this -> formTemplate ] , ] ; } // Prepend our configuration. $ container -> prependExtensionConfig ( $ name , $ formConfig ) ; }
Adds the confirm form template to the TwigBundle configuration.

@param ContainerBuilder $container The service container
Adds the confirm form template to the TwigBundle configuration .