protected function loadBlocks(array $blocks, ContainerBuilder $container)
    {
        foreach ($blocks as $blockName => $block) {
            $container
                ->register(
                    'elcodi.sitemap_element_provider.entity_' . $blockName,
                    'Elcodi\Component\Sitemap\Element\EntitySitemapElementProvider'
                )
                ->addArgument(new Reference($block['repository_service']))
                ->addArgument($block['method'])
                ->addArgument($block['arguments'])
                ->setPublic(false);

            $container
                ->register(
                    'elcodi.sitemap_element_generator.entity_' . $blockName,
                    'Elcodi\Component\Sitemap\Element\EntitySitemapElementGenerator'
                )
                ->addArgument(new Reference('elcodi.factory.sitemap_element'))
                ->addArgument(new Reference($block['transformer']))
                ->addArgument(new Reference('elcodi.sitemap_element_provider.entity_' . $blockName))
                ->addArgument($block['changeFrequency'])
                ->addArgument($block['priority'])
                ->setPublic(false);
        }

        return $this;
    }
protected function loadBlocks(array $blocks, ContainerBuilder $container)
    {
        foreach ($blocks as $blockName => $block) {
            $container
                ->register(
                    'elcodi.sitemap_element_provider.entity_' . $blockName,
                    'Elcodi\Component\Sitemap\Element\EntitySitemapElementProvider'
                )
                ->addArgument(new Reference($block['repository_service']))
                ->addArgument($block['method'])
                ->addArgument($block['arguments'])
                ->setPublic(false);

            $container
                ->register(
                    'elcodi.sitemap_element_generator.entity_' . $blockName,
                    'Elcodi\Component\Sitemap\Element\EntitySitemapElementGenerator'
                )
                ->addArgument(new Reference('elcodi.factory.sitemap_element'))
                ->addArgument(new Reference($block['transformer']))
                ->addArgument(new Reference('elcodi.sitemap_element_provider.entity_' . $blockName))
                ->addArgument($block['changeFrequency'])
                ->addArgument($block['priority'])
                ->setPublic(false);
        }

        return $this;
    }
protected function loadBlocks ( array $ blocks , ContainerBuilder $ container ) { foreach ( $ blocks as $ blockName => $ block ) { $ container -> register ( 'elcodi.sitemap_element_provider.entity_' . $ blockName , 'Elcodi\Component\Sitemap\Element\EntitySitemapElementProvider' ) -> addArgument ( new Reference ( $ block [ 'repository_service' ] ) ) -> addArgument ( $ block [ 'method' ] ) -> addArgument ( $ block [ 'arguments' ] ) -> setPublic ( false ) ; $ container -> register ( 'elcodi.sitemap_element_generator.entity_' . $ blockName , 'Elcodi\Component\Sitemap\Element\EntitySitemapElementGenerator' ) -> addArgument ( new Reference ( 'elcodi.factory.sitemap_element' ) ) -> addArgument ( new Reference ( $ block [ 'transformer' ] ) ) -> addArgument ( new Reference ( 'elcodi.sitemap_element_provider.entity_' . $ blockName ) ) -> addArgument ( $ block [ 'changeFrequency' ] ) -> addArgument ( $ block [ 'priority' ] ) -> setPublic ( false ) ; } return $ this ; }
Load blocks.

@param array            $blocks    Blocks
@param ContainerBuilder $container Container

@return $this self Object
Load blocks .