private function compileMasterBlock(\Twig_Compiler $compiler)
    {
        $name = $this->getAttribute('name');

        $compiler
            ->addDebugInfo($this)
            // create block
            ->write('list($')->raw($name)->raw(', $')->raw($name)->raw('Children) = $this->block_')->raw($name)->raw('($context, $blocks);')
            // inject children in parents
            ->write('foreach ($')->raw($name)->raw('Children as $index => $cConfig) {')->raw("\n")
            ->indent()
            ->write('$cConfig[\'parent\']->add($cConfig[\'child\']);')->raw("\n")
            ->outdent()
            ->write('}')->raw("\n")
            ->write('$')->raw($name)->raw(' = $')->raw($name)->raw(' ')
            ->raw('instanceof \Fxp\Component\Block\BlockView ? $')->raw($name)->raw(' : $')->raw($name)->raw('->createView();')->raw("\n")
            // render
            ->write('echo $this->env->getExtension(\'Fxp\Component\Block\Twig\Extension\BlockExtension\')->renderer->searchAndRenderBlock(')->raw("\n")
            ->indent()
            ->write('$')->raw($name)
            // renderer prefix
            ->raw(',')->raw("\n")
            ->write('"widget"')
            ->raw(', ')->raw("\n")
            // variables
            ->write('')
            ->subcompile($this->getAttribute('variables'))->raw(')')->raw("\n")
            ->outdent()->write(';')->raw("\n")
        ;
    }
private function compileMasterBlock(\Twig_Compiler $compiler)
    {
        $name = $this->getAttribute('name');

        $compiler
            ->addDebugInfo($this)
            // create block
            ->write('list($')->raw($name)->raw(', $')->raw($name)->raw('Children) = $this->block_')->raw($name)->raw('($context, $blocks);')
            // inject children in parents
            ->write('foreach ($')->raw($name)->raw('Children as $index => $cConfig) {')->raw("\n")
            ->indent()
            ->write('$cConfig[\'parent\']->add($cConfig[\'child\']);')->raw("\n")
            ->outdent()
            ->write('}')->raw("\n")
            ->write('$')->raw($name)->raw(' = $')->raw($name)->raw(' ')
            ->raw('instanceof \Fxp\Component\Block\BlockView ? $')->raw($name)->raw(' : $')->raw($name)->raw('->createView();')->raw("\n")
            // render
            ->write('echo $this->env->getExtension(\'Fxp\Component\Block\Twig\Extension\BlockExtension\')->renderer->searchAndRenderBlock(')->raw("\n")
            ->indent()
            ->write('$')->raw($name)
            // renderer prefix
            ->raw(',')->raw("\n")
            ->write('"widget"')
            ->raw(', ')->raw("\n")
            // variables
            ->write('')
            ->subcompile($this->getAttribute('variables'))->raw(')')->raw("\n")
            ->outdent()->write(';')->raw("\n")
        ;
    }
private function compileMasterBlock ( \ Twig_Compiler $ compiler ) { $ name = $ this -> getAttribute ( 'name' ) ; $ compiler -> addDebugInfo ( $ this ) // create block -> write ( 'list($' ) -> raw ( $ name ) -> raw ( ', $' ) -> raw ( $ name ) -> raw ( 'Children) = $this->block_' ) -> raw ( $ name ) -> raw ( '($context, $blocks);' ) // inject children in parents -> write ( 'foreach ($' ) -> raw ( $ name ) -> raw ( 'Children as $index => $cConfig) {' ) -> raw ( "\n" ) -> indent ( ) -> write ( '$cConfig[\'parent\']->add($cConfig[\'child\']);' ) -> raw ( "\n" ) -> outdent ( ) -> write ( '}' ) -> raw ( "\n" ) -> write ( '$' ) -> raw ( $ name ) -> raw ( ' = $' ) -> raw ( $ name ) -> raw ( ' ' ) -> raw ( 'instanceof \Fxp\Component\Block\BlockView ? $' ) -> raw ( $ name ) -> raw ( ' : $' ) -> raw ( $ name ) -> raw ( '->createView();' ) -> raw ( "\n" ) // render -> write ( 'echo $this->env->getExtension(\'Fxp\Component\Block\Twig\Extension\BlockExtension\')->renderer->searchAndRenderBlock(' ) -> raw ( "\n" ) -> indent ( ) -> write ( '$' ) -> raw ( $ name ) // renderer prefix -> raw ( ',' ) -> raw ( "\n" ) -> write ( '"widget"' ) -> raw ( ', ' ) -> raw ( "\n" ) // variables -> write ( '' ) -> subcompile ( $ this -> getAttribute ( 'variables' ) ) -> raw ( ')' ) -> raw ( "\n" ) -> outdent ( ) -> write ( ';' ) -> raw ( "\n" ) ; }
Compile the master block.

@param \Twig_Compiler $compiler The compiler
Compile the master block .