private function createClientPluginNode()
    {
        $builder = new TreeBuilder('plugins');
        $node = $this->getRootNode($builder, 'plugins');

        /** @var ArrayNodeDefinition $pluginList */
        $pluginList = $node
            ->info('A list of plugin service ids. The order is important.')
            ->prototype('array')
        ;
        $pluginList
            // support having just a service id in the list
            ->beforeNormalization()
                ->always(function ($plugin) {
                    if (is_string($plugin)) {
                        return [
                            'reference' => [
                                'enabled' => true,
                                'id' => $plugin,
                            ],
                        ];
                    }

                    return $plugin;
                })
            ->end()
        ;

        $pluginList
            ->children()
                ->arrayNode('reference')
                    ->canBeEnabled()
                    ->info('Reference to a plugin service')
                    ->children()
                        ->scalarNode('id')
                            ->info('Service id of a plugin')
                            ->isRequired()
                            ->cannotBeEmpty()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ->end();

        return $node;
    }
private function createClientPluginNode()
    {
        $builder = new TreeBuilder('plugins');
        $node = $this->getRootNode($builder, 'plugins');

        /** @var ArrayNodeDefinition $pluginList */
        $pluginList = $node
            ->info('A list of plugin service ids. The order is important.')
            ->prototype('array')
        ;
        $pluginList
            // support having just a service id in the list
            ->beforeNormalization()
                ->always(function ($plugin) {
                    if (is_string($plugin)) {
                        return [
                            'reference' => [
                                'enabled' => true,
                                'id' => $plugin,
                            ],
                        ];
                    }

                    return $plugin;
                })
            ->end()
        ;

        $pluginList
            ->children()
                ->arrayNode('reference')
                    ->canBeEnabled()
                    ->info('Reference to a plugin service')
                    ->children()
                        ->scalarNode('id')
                            ->info('Service id of a plugin')
                            ->isRequired()
                            ->cannotBeEmpty()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ->end();

        return $node;
    }
private function createClientPluginNode ( ) { $ builder = new TreeBuilder ( 'plugins' ) ; $ node = $ this -> getRootNode ( $ builder , 'plugins' ) ; /** @var ArrayNodeDefinition $pluginList */ $ pluginList = $ node -> info ( 'A list of plugin service ids. The order is important.' ) -> prototype ( 'array' ) ; $ pluginList // support having just a service id in the list -> beforeNormalization ( ) -> always ( function ( $ plugin ) { if ( is_string ( $ plugin ) ) { return [ 'reference' => [ 'enabled' => true , 'id' => $ plugin , ] , ] ; } return $ plugin ; } ) -> end ( ) ; $ pluginList -> children ( ) -> arrayNode ( 'reference' ) -> canBeEnabled ( ) -> info ( 'Reference to a plugin service' ) -> children ( ) -> scalarNode ( 'id' ) -> info ( 'Service id of a plugin' ) -> isRequired ( ) -> cannotBeEmpty ( ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) ; return $ node ; }
Create plugin node of a client.

@return ArrayNodeDefinition The plugin node
Create plugin node of a client .