Actions

API16

JDocumentHTML/getBuffer

From Joomla! Documentation

< API16:JDocumentHTML
Revision as of 22:07, 12 May 2013 by JoomlaWikiBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Get the contents of a document include

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

getBuffer($type=null, $name=null, $attribs=array())
Parameter Name Default Value Description
$type null $type The type of renderer
$name null $name The name of the element to render
$attribs array() $attribs Associative array of remaining attributes.

Returns

The output of the renderer

Defined in

libraries/joomla/document/html/html.php

Importing

jimport( 'joomla.document.html.html' );

Source Body

function getBuffer($type = null, $name = null, $attribs = array())
{
        // If no type is specified, return the whole buffer
        if ($type === null) {
                return $this->_buffer;
        }
 
        $result = null;
        if (isset($this->_buffer[$type][$name])) {
                return $this->_buffer[$type][$name];
        }
 
        // If the buffer has been explicitly turned off don't display or attempt to render
        if ($result === false) {
                return null;
        }
 
        $renderer = &$this->loadRenderer($type);
        $this->setBuffer($renderer->render($name, $attribs, $result), $type, $name);
 
        return $this->_buffer[$type][$name];
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />