public function render(array $tokenStruct, $view, array $options, Mustache $mustache)
    {
        $subView = $this->getValue($tokenStruct[1], $view);

        // If the view value is not a SubView, we cannot handle it here
        if (! $subView instanceof SubView) {
            return;
        }

        // Get template
        $template = $subView->getTemplate();

        // Get sub view; use current view if none found
        $localView  = $subView->getView();
        if (null === $localView) {
            $localView = $view;
        }

        // Render sub view and return it
        return $mustache->render($template, $localView);
    }
public function render(array $tokenStruct, $view, array $options, Mustache $mustache)
    {
        $subView = $this->getValue($tokenStruct[1], $view);

        // If the view value is not a SubView, we cannot handle it here
        if (! $subView instanceof SubView) {
            return;
        }

        // Get template
        $template = $subView->getTemplate();

        // Get sub view; use current view if none found
        $localView  = $subView->getView();
        if (null === $localView) {
            $localView = $view;
        }

        // Render sub view and return it
        return $mustache->render($template, $localView);
    }
public function render ( array $ tokenStruct , $ view , array $ options , Mustache $ mustache ) { $ subView = $ this -> getValue ( $ tokenStruct [ 1 ] , $ view ) ; // If the view value is not a SubView, we cannot handle it here if ( ! $ subView instanceof SubView ) { return ; } // Get template $ template = $ subView -> getTemplate ( ) ; // Get sub view; use current view if none found $ localView = $ subView -> getView ( ) ; if ( null === $ localView ) { $ localView = $ view ; } // Render sub view and return it return $ mustache -> render ( $ template , $ localView ) ; }
Render a sub view variable.

If the data/view combination do not represent a subview, it returns null,
returning handling to the renderer.

Otherwise, it will render the template and view in the SubView provided.

@param  array $tokenStruct
@param  mixed $view
@param  array $options
@param  Mustache $mustache
@return mixed
Render a sub view variable .