Joomla! 1.5 API

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2011 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JToolBar

Description

ToolBar handler

  • since: 1.5

Located in /joomla/html/toolbar.php (line 28)

Class JObject   (Subpackage Base)

Class JToolBar   (Subpackage HTML)
Method Summary
Constructor JToolBar __construct ([string $name = 'toolbar'])
Method void addButtonPath (string|array $path)
Method string appendButton (string 0, string 1)
Method JToolBar &getInstance ([string $name = 'toolbar'])
Method object &loadButtonType (string $type, [ $new = false])
Method string prependButton (string 0, mixed 1)
Method string render (string 0)
Method array renderButton (object A &$node, string 1)
Variables

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 69)

Constructor

  • var: The type of setup file
  • access: protected
JToolBar __construct ([string $name = 'toolbar'])
  • string $name: The toolbar name

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
addButtonPath (line 252)

Add a directory where JToolBar should search for button types

You may either pass a string or an array of directories.

JParameter will be searching for an element type in the same order you added them. If the parameter type cannot be found in the custom folders, it will look in JParameter/types.

  • since: 1.5
  • access: public
void addButtonPath (string|array $path)
  • string|array $path: directory or directories to search.
appendButton (line 112)

Set a value

  • return: The set value
  • access: public
string appendButton (string 0, string 1)
  • string 0: The name of the param
  • string 1: The value of the parameter
getInstance (line 89)

Returns a reference to a global JToolBar object, only creating it if it doesn't already exist.

This method must be invoked as:

  $toolbar = & JToolBar::getInstance( $name );

  • return: The JToolBar object.
  • access: public
JToolBar &getInstance ([string $name = 'toolbar'])
  • string $name: The name of the toolbar.
loadButtonType (line 194)

Loads a button type

  • since: 1.5
  • access: public
object &loadButtonType (string $type, [ $new = false])
  • string $type: buttonType
  • $new
prependButton (line 128)

Get a value

  • access: public
string prependButton (string 0, mixed 1)
  • string 0: The name of the param
  • mixed 1: The default value if not found
render (line 143)

Render

  • return: HTML
  • access: public
string render (string 0)
  • string 0: The name of the control, or the default text area if a setup file is not found
renderButton (line 170)

Render a parameter type

  • return: Any array of the label, the form element and the tooltip
array renderButton (object A &$node, string 1)
  • string 1: The control name
  • object A &$node: param tag node

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()
Support Joomla!