protected function defineRelationships(NodeBuilder $builder)
    {
        $relationships = $builder->arrayNode('relationships')
            ->useAttributeAsKey('')
            ->prototype('array')
            ->children()

            ->enumNode('type')
                ->values(['one', 'many'])
                ->cannotBeEmpty()
                ->defaultValue('one')
            ->end()

            ->scalarNode('getter')
                ->cannotBeEmpty()
            ->end()

            ->booleanNode('dataAllowed')
                ->defaultFalse()
            ->end()

            ->integerNode('dataLimit')
                ->defaultValue(0)
            ->end();

        $this->defineLinks($relationships);
    }
protected function defineRelationships(NodeBuilder $builder)
    {
        $relationships = $builder->arrayNode('relationships')
            ->useAttributeAsKey('')
            ->prototype('array')
            ->children()

            ->enumNode('type')
                ->values(['one', 'many'])
                ->cannotBeEmpty()
                ->defaultValue('one')
            ->end()

            ->scalarNode('getter')
                ->cannotBeEmpty()
            ->end()

            ->booleanNode('dataAllowed')
                ->defaultFalse()
            ->end()

            ->integerNode('dataLimit')
                ->defaultValue(0)
            ->end();

        $this->defineLinks($relationships);
    }
protected function defineRelationships ( NodeBuilder $ builder ) { $ relationships = $ builder -> arrayNode ( 'relationships' ) -> useAttributeAsKey ( '' ) -> prototype ( 'array' ) -> children ( ) -> enumNode ( 'type' ) -> values ( [ 'one' , 'many' ] ) -> cannotBeEmpty ( ) -> defaultValue ( 'one' ) -> end ( ) -> scalarNode ( 'getter' ) -> cannotBeEmpty ( ) -> end ( ) -> booleanNode ( 'dataAllowed' ) -> defaultFalse ( ) -> end ( ) -> integerNode ( 'dataLimit' ) -> defaultValue ( 0 ) -> end ( ) ; $ this -> defineLinks ( $ relationships ) ; }
Define "relationships" section of configuration

@param NodeBuilder $builder
Define relationships section of configuration