API15:JDocumentHTML/getBuffer
From Joomla! Documentation
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
Code Examples