public function configureProfiler(ContainerBuilder $container, array $config)
    {
        $container->setAlias('sonata.block.renderer', 'sonata.block.renderer.default');

        if (!$config['profiler']['enabled']) {
            return;
        }

        // add the block data collector
        $definition = new Definition('Sonata\BlockBundle\Profiler\DataCollector\BlockDataCollector');
        $definition->setPublic(false);
        $definition->addTag('data_collector', ['id' => 'block', 'template' => $config['profiler']['template']]);
        $definition->addArgument(new Reference('sonata.block.templating.helper'));
        $definition->addArgument($config['container']['types']);

        $container->setDefinition('sonata.block.data_collector', $definition);
    }
public function configureProfiler(ContainerBuilder $container, array $config)
    {
        $container->setAlias('sonata.block.renderer', 'sonata.block.renderer.default');

        if (!$config['profiler']['enabled']) {
            return;
        }

        // add the block data collector
        $definition = new Definition('Sonata\BlockBundle\Profiler\DataCollector\BlockDataCollector');
        $definition->setPublic(false);
        $definition->addTag('data_collector', ['id' => 'block', 'template' => $config['profiler']['template']]);
        $definition->addArgument(new Reference('sonata.block.templating.helper'));
        $definition->addArgument($config['container']['types']);

        $container->setDefinition('sonata.block.data_collector', $definition);
    }
public function configureProfiler ( ContainerBuilder $ container , array $ config ) { $ container -> setAlias ( 'sonata.block.renderer' , 'sonata.block.renderer.default' ) ; if ( ! $ config [ 'profiler' ] [ 'enabled' ] ) { return ; } // add the block data collector $ definition = new Definition ( 'Sonata\BlockBundle\Profiler\DataCollector\BlockDataCollector' ) ; $ definition -> setPublic ( false ) ; $ definition -> addTag ( 'data_collector' , [ 'id' => 'block' , 'template' => $ config [ 'profiler' ] [ 'template' ] ] ) ; $ definition -> addArgument ( new Reference ( 'sonata.block.templating.helper' ) ) ; $ definition -> addArgument ( $ config [ 'container' ] [ 'types' ] ) ; $ container -> setDefinition ( 'sonata.block.data_collector' , $ definition ) ; }
Configures the block profiler.

@param ContainerBuilder $container Container
@param array            $config    Configuration
Configures the block profiler .