Back to Joomla project (class list)

Class Toolbar - list of methods

ToolBar handler
Package: Joomla\CMS\Toolbar
Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Toolbar/Toolbar.php
Project: Joomla

Method Summary

public
(mixed $name = 'toolbar', \Joomla\CMS\Toolbar\ToolbarFactoryInterface $factory = null)

Constructor
Parameters
  • string $name The toolbar name.
  • \Joomla\CMS\Toolbar\ToolbarFactoryInterface $factory The toolbar factory.
Since
  • 1.5
Show source code of this method: __construct Source Code

public static \Joomla\CMS\Toolbar\Toolbar
(mixed $name = 'toolbar')

Returns the global Toolbar object, only creating it if it doesn't already exist.
Parameters
  • string $name The name of the toolbar.
Returns
  • \Joomla\CMS\Toolbar\Toolbar The Toolbar object.
Since
  • 1.5
Deprecated
  • 5.0
-
  • \Joomla\DI\Exception\KeyNotFoundException
Show source code of this method: getInstance Source Code

public $this
(\Joomla\CMS\Toolbar\ToolbarFactoryInterface $factory)

Set the factory instance
Parameters
  • \Joomla\CMS\Toolbar\ToolbarFactoryInterface $factory The factory instance
Returns
  • $this
Since
  • 4.0.0
Show source code of this method: setFactory Source Code

public \Joomla\CMS\Toolbar\ToolbarButton|bool
(mixed $button, mixed $args)

Append a button to toolbar.
Parameters
  • \Joomla\CMS\Toolbar\ToolbarButton $button The button instance.
  • array $args The more arguments.
Returns
  • \Joomla\CMS\Toolbar\ToolbarButton|bool Return button instance to help chaining configure. If using legacy arguments returns true
Since
  • 1.5
Show source code of this method: appendButton Source Code

public array
()

Get the list of toolbar links.
Returns
  • array
Since
  • 1.6
Show source code of this method: getItems Source Code

public static
(array $items)

Set the button list.
Parameters
  • \Joomla\CMS\Toolbar\ToolbarButton[] $items The button list array.
Returns
  • static
Since
  • 4.0.0
Show source code of this method: setItems Source Code

public string
()

Get the name of the toolbar.
Returns
  • string
Since
  • 1.6
Show source code of this method: getName Source Code

public \Joomla\CMS\Toolbar\ToolbarButton|bool
(mixed $button, mixed $args)

Prepend a button to toolbar.
Parameters
  • \Joomla\CMS\Toolbar\ToolbarButton $button The button instance.
  • array $args The more arguments.
Returns
  • \Joomla\CMS\Toolbar\ToolbarButton|bool Return button instance to help chaining configure. If using legacy arguments returns true
Since
  • 1.5
Show source code of this method: prependButton Source Code

public string
(array $options = [])

Render a toolbar.
Parameters
  • array $options The options of toolbar.
Returns
  • string HTML for the toolbar.
Since
  • 1.5
-
  • \Exception
Show source code of this method: render Source Code

public string
(mixed &$node)

Render a button.
Parameters
  • array & $node A toolbar node.
Returns
  • string
Since
  • 1.5
-
  • \Exception
Show source code of this method: renderButton Source Code

public false|\Joomla\CMS\Toolbar\ToolbarButton
(mixed $type, mixed $new = false)

Loads a button type.
Parameters
  • string $type Button Type
  • bool $new False by default
Returns
  • false|\Joomla\CMS\Toolbar\ToolbarButton
Since
  • 1.5
Show source code of this method: loadButtonType Source Code

public void
(mixed $path)

Add a directory where Toolbar should search for button types in LIFO order.
Parameters
  • mixed $path Directory or directories to search.
Returns
  • void
Since
  • 1.5
Deprecated
  • 5.0
Show source code of this method: addButtonPath Source Code

public array
()

Get the lookup paths for button objects
Returns
  • array
Since
  • 4.0.0
Deprecated
  • 5.0
Show source code of this method: getButtonPath Source Code

public static
(mixed $name)

Create child toolbar.
Parameters
  • string $name The toolbar name.
Returns
  • static
Since
  • 4.0.0
Show source code of this method: createChild Source Code

public \Joomla\CMS\Toolbar\ToolbarButton
(mixed $name, mixed $args)

Magic method proxy.
Parameters
  • string $name The method name.
  • array $args The method arguments.
Returns
  • \Joomla\CMS\Toolbar\ToolbarButton
Since
  • 4.0.0
-
  • \Exception
Show source code of this method: __call Source Code

Properties Summary

protected string
$_name
Toolbar name
Since
  • 1.5
protected array
$_bar
Toolbar array
Since
  • 1.5
protected array
$_buttonPath
Directories, where button types can be stored.
Since
  • 1.5
protected static \Joomla\CMS\Toolbar\Toolbar[]
$instances
Stores the singleton instances of various toolbar.
Since
  • 2.5
protected \Joomla\CMS\Toolbar\ToolbarFactoryInterface
$factory
Factory for creating Toolbar API objects
Since
  • 4.0.0

Tags Summary

public \Joomla\CMS\Toolbar\Button\StandardButton
standardButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\SeparatorButton
separatorButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\PopupButton
popupButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\LinkButton
linkButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\HelpButton
helpButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\InlinehelpButton
inlinehelpButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\CustomButton
customButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\ConfirmButton
confirmButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\BasicButton
basicButton (string $name = '', string $text = '', string $task = '')
public \Joomla\CMS\Toolbar\Button\DropdownButton
dropdownButton (string $name = '', string $text = '', string $task = '')
Since
1.5