bundles/BlockManagerBundle/DependencyInjection/CompilerPass/Layout/LayoutTypePass.php
private function buildLayoutTypes(ContainerBuilder $container, array $layoutTypes): Generator
    {
        foreach ($layoutTypes as $identifier => $layoutType) {
            $serviceIdentifier = sprintf('netgen_block_manager.layout.layout_type.%s', $identifier);

            $container->register($serviceIdentifier, LayoutType::class)
                ->setArguments([$identifier, $layoutType])
                ->setLazy(true)
                ->setPublic(true)
                ->setFactory([LayoutTypeFactory::class, 'buildLayoutType']);

            yield $identifier => new Reference($serviceIdentifier);
        }
    }
private function buildLayoutTypes(ContainerBuilder $container, array $layoutTypes): Generator
    {
        foreach ($layoutTypes as $identifier => $layoutType) {
            $serviceIdentifier = sprintf('netgen_block_manager.layout.layout_type.%s', $identifier);

            $container->register($serviceIdentifier, LayoutType::class)
                ->setArguments([$identifier, $layoutType])
                ->setLazy(true)
                ->setPublic(true)
                ->setFactory([LayoutTypeFactory::class, 'buildLayoutType']);

            yield $identifier => new Reference($serviceIdentifier);
        }
    }
private function buildLayoutTypes ( ContainerBuilder $ container , array $ layoutTypes ) : Generator { foreach ( $ layoutTypes as $ identifier => $ layoutType ) { $ serviceIdentifier = sprintf ( 'netgen_block_manager.layout.layout_type.%s' , $ identifier ) ; $ container -> register ( $ serviceIdentifier , LayoutType :: class ) -> setArguments ( [ $ identifier , $ layoutType ] ) -> setLazy ( true ) -> setPublic ( true ) -> setFactory ( [ LayoutTypeFactory :: class , 'buildLayoutType' ] ) ; yield $ identifier => new Reference ( $ serviceIdentifier ) ; } }
Builds the layout type objects from provided configuration.
Builds the layout type objects from provided configuration .