Actions

Difference between revisions of "JDocument/loadRenderer"

From Joomla! Documentation

(New page: Loads and instantiates a document renderer class. ===Syntax=== object loadRenderer( $type ) where: {| class="wikitable" !Argument !Data type !Description !Default |- |$type |string |Rende...)
 
m (See also: Framework => Platform)
 
Line 23: Line 23:
 
This will load the renderer class JDocumentRendererMyrenderer in /libraries/joomla/document/mytype/renderer/myrenderer.php.
 
This will load the renderer class JDocumentRendererMyrenderer in /libraries/joomla/document/mytype/renderer/myrenderer.php.
 
===See also===
 
===See also===
* [http://api.joomla.org/Joomla-Framework/Document/JDocument.html#loadRenderer JDocument->loadRenderer on api.joomla.org]
+
* [http://api.joomla.org/Joomla-Platform/Document/JDocument.html#loadRenderer JDocument->loadRenderer on api.joomla.org]
 
* [[JDocumentRenderer]]
 
* [[JDocumentRenderer]]
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocument]]</noinclude>
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocument]]</noinclude>

Latest revision as of 03:30, 25 September 2013

Loads and instantiates a document renderer class.

Syntax

object loadRenderer( $type )

where:

Argument Data type Description Default
$type string Renderer type.

Example

To load the 'myrenderer' renderer class for the 'mytype' document type:

$doc =& JDocument::getInstance( 'mytype' );
$renderer =& $doc->loadRenderer( 'myrenderer' );

This will load the renderer class JDocumentRendererMyrenderer in /libraries/joomla/document/mytype/renderer/myrenderer.php.

See also