JEditor/getInstance
From Joomla! Documentation
< API16:JEditorRevision as of 00:02, 13 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)
Revision as of 00:02, 13 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Returns the global Editor object, only creating it if it doesn't already exist.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
static getInstance($editor= 'none')
Parameter Name | Default Value | Description |
---|---|---|
$editor | 'none' | $editor The editor to use. |
Returns[edit]
The Editor object.
Defined in[edit]
libraries/joomla/html/editor.php
Importing[edit]
jimport( 'joomla.html.editor' );
Source Body[edit]
public static function getInstance($editor = 'none')
{
static $instances;
if (!isset ($instances)) {
$instances = array ();
}
$signature = serialize($editor);
if (empty ($instances[$signature])) {
$instances[$signature] = new JEditor($editor);
}
return $instances[$signature];
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
<CodeExamplesForm />