DependencyInjection/BaseConfiguration.php
protected function addMappingNode(
        string $nodeName,
        string $entityClass,
        string $entityMappingFile,
        string $entityManager,
        bool $entityEnabled
    ): NodeDefinition {
        $builder = new TreeBuilder();
        $node = $builder->root($nodeName);
        $node
            ->treatFalseLike([
                'enabled' => false,
            ])
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('class')
                    ->defaultValue($entityClass)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('mapping_file')
                    ->defaultValue($entityMappingFile)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('manager')
                    ->defaultValue($entityManager)
                    ->cannotBeEmpty()
                ->end()
                ->booleanNode('enabled')
                    ->defaultValue($entityEnabled)
                ->end()
            ->end()
        ->end();

        return $node;
    }
protected function addMappingNode(
        string $nodeName,
        string $entityClass,
        string $entityMappingFile,
        string $entityManager,
        bool $entityEnabled
    ): NodeDefinition {
        $builder = new TreeBuilder();
        $node = $builder->root($nodeName);
        $node
            ->treatFalseLike([
                'enabled' => false,
            ])
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('class')
                    ->defaultValue($entityClass)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('mapping_file')
                    ->defaultValue($entityMappingFile)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('manager')
                    ->defaultValue($entityManager)
                    ->cannotBeEmpty()
                ->end()
                ->booleanNode('enabled')
                    ->defaultValue($entityEnabled)
                ->end()
            ->end()
        ->end();

        return $node;
    }
protected function addMappingNode ( string $ nodeName , string $ entityClass , string $ entityMappingFile , string $ entityManager , bool $ entityEnabled ) : NodeDefinition { $ builder = new TreeBuilder ( ) ; $ node = $ builder -> root ( $ nodeName ) ; $ node -> treatFalseLike ( [ 'enabled' => false , ] ) -> addDefaultsIfNotSet ( ) -> children ( ) -> scalarNode ( 'class' ) -> defaultValue ( $ entityClass ) -> cannotBeEmpty ( ) -> end ( ) -> scalarNode ( 'mapping_file' ) -> defaultValue ( $ entityMappingFile ) -> cannotBeEmpty ( ) -> end ( ) -> scalarNode ( 'manager' ) -> defaultValue ( $ entityManager ) -> cannotBeEmpty ( ) -> end ( ) -> booleanNode ( 'enabled' ) -> defaultValue ( $ entityEnabled ) -> end ( ) -> end ( ) -> end ( ) ; return $ node ; }
Add a mapping node into configuration.

@param string $nodeName
@param string $entityClass
@param string $entityMappingFile
@param string $entityManager
@param bool   $entityEnabled

@return NodeDefinition Node
Add a mapping node into configuration .