DependencyInjection/ASFLayoutExtension.php
protected function addTwbsInAssetic(ContainerBuilder $container, array $config)
    {
        if ($config['twbs_dir'] !== false && !is_null($config['twbs_dir'])) {

            // Twitter Bootstrap javascript files
            $inputs = array();
            foreach ($config['js'] as $file) {
                $inputs[] = $config['twbs_dir'].'/'.$file;
            }

            $container->prependExtensionConfig('assetic', array(
                'assets' => array(
                    'twbs_js' => array(
                        'inputs' => $inputs,
                    ),
                ),
            ));

            // Twitter Bootstrap Less files or CSS files
            if (count($config['less']) > 0 && count($config['css']) > 0) {
                throw new InvalidConfigurationException('You can\'t have less files and css files in your Twitter Bootstrap Configuration, choose one.');
            } elseif (count($config['less']) > 0) {
                $inputs = array();
                foreach ($config['less'] as $file) {
                    $inputs[] = $config['twbs_dir'].'/'.$file;
                }

                $container->prependExtensionConfig('assetic', array(
                    'assets' => array(
                        'twbs_css' => array(
                            'inputs' => $inputs,
                        ),
                    ),
                ));
            } elseif (count($config['css']) > 0) {
                $inputs = array();
                foreach ($config['css'] as $file) {
                    $inputs[] = $config['twbs_dir'].'/'.$file;
                }

                $container->prependExtensionConfig('assetic', array(
                    'assets' => array(
                        'twbs_css' => array(
                            'inputs' => $inputs,
                        ),
                    ),
                ));
            }
        }
    }
protected function addTwbsInAssetic(ContainerBuilder $container, array $config)
    {
        if ($config['twbs_dir'] !== false && !is_null($config['twbs_dir'])) {

            // Twitter Bootstrap javascript files
            $inputs = array();
            foreach ($config['js'] as $file) {
                $inputs[] = $config['twbs_dir'].'/'.$file;
            }

            $container->prependExtensionConfig('assetic', array(
                'assets' => array(
                    'twbs_js' => array(
                        'inputs' => $inputs,
                    ),
                ),
            ));

            // Twitter Bootstrap Less files or CSS files
            if (count($config['less']) > 0 && count($config['css']) > 0) {
                throw new InvalidConfigurationException('You can\'t have less files and css files in your Twitter Bootstrap Configuration, choose one.');
            } elseif (count($config['less']) > 0) {
                $inputs = array();
                foreach ($config['less'] as $file) {
                    $inputs[] = $config['twbs_dir'].'/'.$file;
                }

                $container->prependExtensionConfig('assetic', array(
                    'assets' => array(
                        'twbs_css' => array(
                            'inputs' => $inputs,
                        ),
                    ),
                ));
            } elseif (count($config['css']) > 0) {
                $inputs = array();
                foreach ($config['css'] as $file) {
                    $inputs[] = $config['twbs_dir'].'/'.$file;
                }

                $container->prependExtensionConfig('assetic', array(
                    'assets' => array(
                        'twbs_css' => array(
                            'inputs' => $inputs,
                        ),
                    ),
                ));
            }
        }
    }
protected function addTwbsInAssetic ( ContainerBuilder $ container , array $ config ) { if ( $ config [ 'twbs_dir' ] !== false && ! is_null ( $ config [ 'twbs_dir' ] ) ) { // Twitter Bootstrap javascript files $ inputs = array ( ) ; foreach ( $ config [ 'js' ] as $ file ) { $ inputs [ ] = $ config [ 'twbs_dir' ] . '/' . $ file ; } $ container -> prependExtensionConfig ( 'assetic' , array ( 'assets' => array ( 'twbs_js' => array ( 'inputs' => $ inputs , ) , ) , ) ) ; // Twitter Bootstrap Less files or CSS files if ( count ( $ config [ 'less' ] ) > 0 && count ( $ config [ 'css' ] ) > 0 ) { throw new InvalidConfigurationException ( 'You can\'t have less files and css files in your Twitter Bootstrap Configuration, choose one.' ) ; } elseif ( count ( $ config [ 'less' ] ) > 0 ) { $ inputs = array ( ) ; foreach ( $ config [ 'less' ] as $ file ) { $ inputs [ ] = $ config [ 'twbs_dir' ] . '/' . $ file ; } $ container -> prependExtensionConfig ( 'assetic' , array ( 'assets' => array ( 'twbs_css' => array ( 'inputs' => $ inputs , ) , ) , ) ) ; } elseif ( count ( $ config [ 'css' ] ) > 0 ) { $ inputs = array ( ) ; foreach ( $ config [ 'css' ] as $ file ) { $ inputs [ ] = $ config [ 'twbs_dir' ] . '/' . $ file ; } $ container -> prependExtensionConfig ( 'assetic' , array ( 'assets' => array ( 'twbs_css' => array ( 'inputs' => $ inputs , ) , ) , ) ) ; } } }
Adding Twitter Bootstrap in Assetic.

@param ContainerBuilder $container
@param array            $config

@throws InvalidConfigurationException : You can't have less files and css files configured
Adding Twitter Bootstrap in Assetic .