API16:JToolBar/getInstance
From Joomla! Documentation
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
Returns the global JToolBar object, only creating it if it doesn't already exist.
Description:JToolBar/getInstance
Syntax
static getInstance($name= 'toolbar')
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | 'toolbar' | $name The name of the toolbar. |
Returns
The object.
Defined in
libraries/joomla/html/toolbar.php
Importing
jimport( 'joomla.html.toolbar' );
Source Body
public static function getInstance($name = 'toolbar') { static $instances; if (!isset($instances)) { $instances = array (); } if (empty($instances[$name])) { $instances[$name] = new JToolBar($name); } return $instances[$name]; }
[Edit See Also] SeeAlso:JToolBar/getInstance
Examples
<CodeExamplesForm />
