API16:JHtmlContent/prepare
From Joomla! Documentation
Description
Fire onPrepareContent for content that isn't part of an article.
<! removed transcluded page call, red link never existed >
Syntax
static prepare($text, $params=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $text | The content to be transformed. | |
| $params | null | The content params. |
Returns
string The content after transformation.
Defined in
libraries/joomla/html/html/content.php
Importing
jimport( 'joomla.html.html.content' );
Source Body
public static function prepare($text, $params = null)
{
if ($params === null) {
$params = array();
}
$article = new stdClass;
$article->text = $text;
JPluginHelper::importPlugin('content');
$dispatcher = &JDispatcher::getInstance();
$results = $dispatcher->trigger(
'onPrepareContent', array (&$article, &$params, 0)
);
return $article->text;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples