private function registerStandaloneWidgets(ContainerBuilder $container)
    {
        //====================================================================//
        // Load Service Definition
        $definition = $container->getDefinition('splash.connectors.standalone');
        //====================================================================//
        // Load List of Tagged Widget Services
        $taggedWidgets = $container->findTaggedServiceIds('splash.standalone.widget');
        //====================================================================//
        // Register Widget Services
        foreach ($taggedWidgets as $id => $serviceTags) {
            foreach ($serviceTags as $attributes) {
                //====================================================================//
                // Ensure Widget Type is set
                if (!isset($attributes["type"])) {
                    throw new Exception('Tagged Standalone Widget Service as no "type" attribute.');
                }
                //====================================================================//
                // Add Widget Service to Connector
                $definition->addMethodCall('registerWidgetService', array($attributes["type"], new Reference($id)));
            }
        }
    }
private function registerStandaloneWidgets(ContainerBuilder $container)
    {
        //====================================================================//
        // Load Service Definition
        $definition = $container->getDefinition('splash.connectors.standalone');
        //====================================================================//
        // Load List of Tagged Widget Services
        $taggedWidgets = $container->findTaggedServiceIds('splash.standalone.widget');
        //====================================================================//
        // Register Widget Services
        foreach ($taggedWidgets as $id => $serviceTags) {
            foreach ($serviceTags as $attributes) {
                //====================================================================//
                // Ensure Widget Type is set
                if (!isset($attributes["type"])) {
                    throw new Exception('Tagged Standalone Widget Service as no "type" attribute.');
                }
                //====================================================================//
                // Add Widget Service to Connector
                $definition->addMethodCall('registerWidgetService', array($attributes["type"], new Reference($id)));
            }
        }
    }
private function registerStandaloneWidgets ( ContainerBuilder $ container ) { //====================================================================// // Load Service Definition $ definition = $ container -> getDefinition ( 'splash.connectors.standalone' ) ; //====================================================================// // Load List of Tagged Widget Services $ taggedWidgets = $ container -> findTaggedServiceIds ( 'splash.standalone.widget' ) ; //====================================================================// // Register Widget Services foreach ( $ taggedWidgets as $ id => $ serviceTags ) { foreach ( $ serviceTags as $ attributes ) { //====================================================================// // Ensure Widget Type is set if ( ! isset ( $ attributes [ "type" ] ) ) { throw new Exception ( 'Tagged Standalone Widget Service as no "type" attribute.' ) ; } //====================================================================// // Add Widget Service to Connector $ definition -> addMethodCall ( 'registerWidgetService' , array ( $ attributes [ "type" ] , new Reference ( $ id ) ) ) ; } } }
Register Tagged Widgets Services to Standalone Connector

@param ContainerBuilder $container

@throws Exception
Register Tagged Widgets Services to Standalone Connector