Actions

API16

JHtmlContent/prepare

From Joomla! Documentation

< API16:JHtmlContent
Revision as of 17:42, 22 March 2010 by Doxiki (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

Fire onPrepareContent for content that isn't part of an article.

[Edit Descripton]

Description:JHtmlContent/prepare

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;
}

[Edit See Also] SeeAlso:JHtmlContent/prepare

Examples

<CodeExamplesForm />