wearejust / sonata-theme-bundle

A custom theme for a Sonata project
https://wearejust.com
MIT License
4 stars 0 forks source link

Feature: Add configuration option for extra assets #20

Closed ceesvanegmond closed 7 years ago

ceesvanegmond commented 7 years ago

Feature: Add configuration option for extra assets

This enables you to hook into this bundle using prepend().

    // Other bundle extension

    /**
     * Allow an extension to prepend the extension configurations.
     *
     * @param ContainerBuilder $container
     */
    public function prepend(ContainerBuilder $container)
    {
        if ($container->hasExtension('just_sonata_theme')) {
            $container->prependExtensionConfig('just_sonata_theme', [
                'extra_css_assets' => [
                    xxx'
                ],
                'extra_js_assets' => [
                    'xxx',
                ],
            ]);
        }
    }

Changelog

### Added
- Added new configuration option (array) for extra js/css assets