code/view/behavior/decoratable.php
protected function _afterRender(ViewContextInterface $context)
    {
        foreach ($this->getDecorators() as $decorator)
        {
            //Set the content to allow it to be decorated
            $this->setContent($context->result);

            //A fully qualified template path is required
            $layout = $this->qualifyLayout($decorator);

            //Unpack the data (first level only)
            $data = $context->data->toArray();

            $context->result = $this->getTemplate()
                ->setParameters($context->parameters)
                ->render($layout, $data);
        }
    }
protected function _afterRender(ViewContextInterface $context)
    {
        foreach ($this->getDecorators() as $decorator)
        {
            //Set the content to allow it to be decorated
            $this->setContent($context->result);

            //A fully qualified template path is required
            $layout = $this->qualifyLayout($decorator);

            //Unpack the data (first level only)
            $data = $context->data->toArray();

            $context->result = $this->getTemplate()
                ->setParameters($context->parameters)
                ->render($layout, $data);
        }
    }
protected function _afterRender ( ViewContextInterface $ context ) { foreach ( $ this -> getDecorators ( ) as $ decorator ) { //Set the content to allow it to be decorated $ this -> setContent ( $ context -> result ) ; //A fully qualified template path is required $ layout = $ this -> qualifyLayout ( $ decorator ) ; //Unpack the data (first level only) $ data = $ context -> data -> toArray ( ) ; $ context -> result = $ this -> getTemplate ( ) -> setParameters ( $ context -> parameters ) -> render ( $ layout , $ data ) ; } }
Decorate the view

@param ViewContextInterface $context	A view context object
@return void
Decorate the view