class Toolbar

ToolBar handler

Methods

__construct( string $name = 'toolbar')

Constructor

static  JToolbar
getInstance( string $name = 'toolbar')

Returns the global Toolbar object, only creating it if it doesn't already exist.

string
appendButton()

Set a value

array
getItems()

Get the list of toolbar links.

string
getName()

Get the name of the toolbar.

string
prependButton()

Get a value.

string
render()

Render a toolbar.

string
renderButton( object $node)

Render a button.

boolean
loadButtonType( string $type, boolean $new = false)

Loads a button type.

void
addButtonPath( mixed $path)

Add a directory where Toolbar should search for button types in LIFO order.

Details

__construct( string $name = 'toolbar')

Constructor

Parameters

string $name The toolbar name.

static JToolbar getInstance( string $name = 'toolbar')

Returns the global Toolbar object, only creating it if it doesn't already exist.

Parameters

string $name The name of the toolbar.

Return Value

JToolbar The JToolbar object.

string appendButton()

Set a value

Return Value

string The set value.

array getItems()

Get the list of toolbar links.

Return Value

array

string getName()

Get the name of the toolbar.

Return Value

string

string prependButton()

Get a value.

Return Value

string

string render()

Render a toolbar.

Return Value

string HTML for the toolbar.

string renderButton( object $node)

Render a button.

Parameters

object $node &$node A toolbar node.

Return Value

string

boolean loadButtonType( string $type, boolean $new = false)

Loads a button type.

Parameters

string $type Button Type
boolean $new False by default

Return Value

boolean

void addButtonPath( mixed $path)

Add a directory where Toolbar should search for button types in LIFO order.

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

Toolbar 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 libraries/joomla/html/toolbar/button.

Parameters

mixed $path Directory or directories to search.

Return Value

void