private function buildConfigDefinition($baseDir)
    {
        $definition = new Definition('BackBee\Config\Config', array(
            $this->getConfigDirByBundleBaseDir($baseDir),
            new Reference('cache.bootstrap'),
            null,
            '%debug%',
            '%config.yml_files_to_ignore%',
        ));

        if (true === $this->application->getContainer()->getParameter('container.autogenerate')) {
            $definition->addTag('dumpable', array('dispatch_event' => false));
        }

        $definition->addMethodCall('setContainer', array(new Reference('service_container')));
        $definition->addMethodCall('setEnvironment', array('%bbapp.environment%'));
        $definition->setConfigurator(array(new Reference('config.configurator'), 'configureBundleConfig'));
        $definition->addTag('bundle.config', array('dispatch_event' => false));

        return $definition;
    }