Toolbar
ToolBar handler
since |
1.5 |
---|
Methods
__construct
Constructor
__construct(string $name = 'toolbar')
since |
1.5 |
---|
Arguments
- $name
string
The toolbar name.
addButtonPath
Add a directory where Toolbar should search for button types in LIFO order.
addButtonPath(mixed $path) : void
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.
since |
1.5 |
---|
Arguments
- $path
mixed
Directory or directories to search.
appendButton
Set a value
appendButton() : string
since |
1.5 |
---|
Response
string
The set value.
getInstance
Returns the global Toolbar object, only creating it if it doesn't already exist.
getInstance(string $name = 'toolbar') : \JToolbar
since |
1.5 |
---|
Arguments
- $name
string
The name of the toolbar.
Response
\JToolbar
The JToolbar object.
getItems
Get the list of toolbar links.
getItems() : array
since |
1.6 |
---|
Response
array
getName
Get the name of the toolbar.
getName() : string
since |
1.6 |
---|
Response
string
loadButtonClass
Load the button class including the deprecated ones.
loadButtonClass(string $type) : string|null
since |
3.8.0 |
---|
Arguments
- $type
string
Button Type
Response
string|null
loadButtonType
Loads a button type.
loadButtonType(string $type, boolean $new = false) : boolean
since |
1.5 |
---|
Arguments
- $type
string
Button Type- $new
boolean
False by default
Response
boolean
prependButton
Get a value.
prependButton() : string
since |
1.5 |
---|
Response
string
render
Render a toolbar.
render() : string
since |
1.5 |
---|
Response
string
HTML for the toolbar.
renderButton
Render a button.
renderButton( &$node) : string
since |
1.5 |
---|
Arguments
- $node
Response
string
Properties
_name
Toolbar name
Type(s)
string
_bar
Toolbar array
Type(s)
array
_buttons
Loaded buttons
Type(s)
array
_buttonPath
Directories, where button types can be stored.
Type(s)
array
instances
Stores the singleton instances of various toolbar.