Actions

API15

JDocumentHTML/getBuffer

From Joomla! Documentation

< API15:JDocumentHTML
Revision as of 09:06, 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())
{
        $result = null;
 
        // If no type is specified, return the whole buffer
        if ($type === null) {
                return $this->_buffer;
        }
 
        if(isset($this->_buffer[$type][$name])) {
                $result = $this->_buffer[$type][$name];
        }
 
        // If the buffer has been explicitly turned off don't display or attempt to render
        if ($result === false) {
                return null;
        }
 
        if( $renderer =& $this->loadRenderer( $type )) {
                $result = $renderer->render($name, $attribs, $result);
        }
 
        return $result;
}

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

Examples

<CodeExamplesForm />