public function addUglifyConfiguration($uglifyConfigFile, $isDebug, ContainerBuilder $container)
    {
        if (!is_file($uglifyConfigFile)) {
            throw new InvalidConfigurationException(
                "zicht_framework_extra.uglify setting '$uglifyConfigFile' is not a file"
            );
        }

        $container->addResource(new FileResource($uglifyConfigFile));

        try {
            $uglifyConfig = Yaml::parse(file_get_contents($uglifyConfigFile));
        } catch (\Exception $e) {
            throw new InvalidConfigurationException(
                "zicht_framework_extra.uglify setting '$uglifyConfigFile' could not be read",
                0,
                $e
            );
        }

        $global = new Definition(
            'Zicht\Bundle\FrameworkExtraBundle\Twig\UglifyGlobal',
            array(
                $uglifyConfig,
                $isDebug
            )
        );

        $global->addTag('twig.global');
        $global->addMethodCall('setDebug', array($isDebug));
        $container->getDefinition('zicht_twig_extension')->addMethodCall('setGlobal', array('zicht_uglify', $global));
    }