protected function loadProfiles(array $profiles, ContainerBuilder $container)
    {
        foreach ($profiles as $profileName => $profile) {
            $definition = $container
                ->register(
                    'elcodi.sitemap_profile.' . $profileName,
                    'Elcodi\Component\Sitemap\Profile\SitemapProfile'
                )
                ->addArgument(new Reference($profile['languages']))
                ->setPublic(true);

            foreach ($profile['builders'] as $builderReference) {
                $definition->addMethodCall(
                    'addSitemapDumper',
                    [new Reference('elcodi.sitemap_dumper.' . $builderReference)]
                );
            }
        }

        return $this;
    }
protected function loadProfiles(array $profiles, ContainerBuilder $container)
    {
        foreach ($profiles as $profileName => $profile) {
            $definition = $container
                ->register(
                    'elcodi.sitemap_profile.' . $profileName,
                    'Elcodi\Component\Sitemap\Profile\SitemapProfile'
                )
                ->addArgument(new Reference($profile['languages']))
                ->setPublic(true);

            foreach ($profile['builders'] as $builderReference) {
                $definition->addMethodCall(
                    'addSitemapDumper',
                    [new Reference('elcodi.sitemap_dumper.' . $builderReference)]
                );
            }
        }

        return $this;
    }
protected function loadProfiles ( array $ profiles , ContainerBuilder $ container ) { foreach ( $ profiles as $ profileName => $ profile ) { $ definition = $ container -> register ( 'elcodi.sitemap_profile.' . $ profileName , 'Elcodi\Component\Sitemap\Profile\SitemapProfile' ) -> addArgument ( new Reference ( $ profile [ 'languages' ] ) ) -> setPublic ( true ) ; foreach ( $ profile [ 'builders' ] as $ builderReference ) { $ definition -> addMethodCall ( 'addSitemapDumper' , [ new Reference ( 'elcodi.sitemap_dumper.' . $ builderReference ) ] ) ; } } return $ this ; }
Load profiles.

@param array            $profiles  Profiles
@param ContainerBuilder $container Container

@return $this self Object
Load profiles .