Toolbar
ToolBar handler
since |
1.5 |
---|---|
package |
Joomla CMS |
Methods
__call
Magic method proxy.
__call(string name, array args) : \Joomla\CMS\Toolbar\ToolbarButton
throws |
|
---|---|
since |
4.0.0 |
Arguments
- name
string
The method name.- args
array
The method arguments.
Response
\Joomla\CMS\Toolbar\ToolbarButton
__construct
Constructor
__construct(string name = 'toolbar', \Joomla\CMS\Toolbar\ToolbarFactoryInterface factory = null) : mixed
since |
1.5 |
---|
Arguments
- name
string
The toolbar name.- factory
\Joomla\CMS\Toolbar\ToolbarFactoryInterface
The toolbar factory.
Response
mixed
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 |
---|---|
deprecated |
5.0 ToolbarButton classes should be autoloaded |
Arguments
- path
mixed
Directory or directories to search.
addNew
Writes the common 'new' icon for the button bar.
addNew(string task, string text = 'JTOOLBAR_NEW') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
appendButton
Append a button to toolbar.
appendButton(\Joomla\CMS\Toolbar\ToolbarButton button, array args) : \Joomla\CMS\Toolbar\ToolbarButton|bool
since |
1.5 |
---|
Arguments
- button
\Joomla\CMS\Toolbar\ToolbarButton
The button instance.- args
array
The more arguments.
Response
\Joomla\CMS\Toolbar\ToolbarButton|bool
Return button instance to help chaining configure. If using legacy arguments
returns true
apply
Writes a save button for a given option.
apply(string task, string text = 'JTOOLBAR_APPLY') : \Joomla\CMS\Toolbar\Button\StandardButton
Apply operation leads to a save action only (does not leave edit mode).
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
archive
Writes a common 'archive' button.
archive(string task, string text = 'JTOOLBAR_ARCHIVE') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
assign
Writes a common 'assign' button for a record.
assign(string task, string text = 'JTOOLBAR_ASSIGN') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
back
Writes a cancel button that will go back to the previous page without doing any other operation.
back(string text = 'JTOOLBAR_BACK') : \Joomla\CMS\Toolbar\Button\LinkButton
since |
4.0.0 |
---|
Arguments
- text
string
The text of button.
Response
\Joomla\CMS\Toolbar\Button\LinkButton
basicButton
basicButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\BasicButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\BasicButton
cancel
Writes a cancel button and invokes a cancel operation (eg a checkin).
cancel(string task, string text = 'JTOOLBAR_CLOSE') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
checkin
Writes a checkin button for a given option.
checkin(string task, string text = 'JTOOLBAR_CHECKIN') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
confirmButton
confirmButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\ConfirmButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\ConfirmButton
createChild
Create child toolbar.
createChild(string name) : static
since |
4.0.0 |
---|
Arguments
- name
string
The toolbar name.
Response
static
customButton
customButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\CustomButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\CustomButton
customHtml
Writes a custom HTML to toolbar.
customHtml(string html, string name = 'custom') : \Joomla\CMS\Toolbar\Button\CustomButton
since |
4.0.0 |
---|
Arguments
- html
string
The HTML string to write.- name
string
The button name.
Response
\Joomla\CMS\Toolbar\Button\CustomButton
delete
Writes a common 'delete' button.
delete(string task, string text = 'JTOOLBAR_DELETE') : \Joomla\CMS\Toolbar\Button\ConfirmButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\ConfirmButton
divider
Writes a divider between dropdown menu items.
divider(string text = '') : \Joomla\CMS\Toolbar\Button\SeparatorButton
since |
4.0.0 |
---|
Arguments
- text
string
The text of button.
Response
\Joomla\CMS\Toolbar\Button\SeparatorButton
dropdownButton
dropdownButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\DropdownButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\DropdownButton
edit
Writes a common 'edit' button.
edit(string task, string text = 'JTOOLBAR_EDIT') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
editCss
Writes a common 'editCss' button.
editCss(string task, string text = 'JTOOLBAR_EDIT_CSS') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
editHtml
Writes a common 'editHtml' button.
editHtml(string task, string text = 'JTOOLBAR_EDIT_HTML') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
getButtonPath
Get the lookup paths for button objects
getButtonPath() : array
since |
4.0.0 |
---|---|
deprecated |
5.0 ToolbarButton classes should be autoloaded |
Response
array
getInstance
Returns the global Toolbar object, only creating it if it doesn't already exist.
getInstance(string name = 'toolbar') : \Joomla\CMS\Toolbar\Toolbar
since |
1.5 |
---|---|
deprecated |
5.0 Use the ToolbarFactoryInterface instead |
throws |
|
Arguments
- name
string
The name of the toolbar.
Response
\Joomla\CMS\Toolbar\Toolbar
The Toolbar 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
help
Writes a help button for a given option (opens a popup window).
help(string ref, bool useComponent = false, string url = null, string component = null) : \Joomla\CMS\Toolbar\Button\HelpButton
since |
4.0.0 |
---|
Arguments
- ref
string
The name of the popup file (excluding the file extension for an xml file).- useComponent
bool
Use the help file in the component directory.- url
string
Use this URL instead of any other.- component
string
Name of component to get Help (null for current component)
Response
\Joomla\CMS\Toolbar\Button\HelpButton
helpButton
helpButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\HelpButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\HelpButton
inlinehelpButton
inlinehelpButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\InlinehelpButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\InlinehelpButton
jooa11y
Writes a jooa11y accessibility checker button for a given option (opens a popup window).
jooa11y(string url, string text = 'JGLOBAL_JOOA11Y', bool newWindow = false) : \Joomla\CMS\Toolbar\Button\PopupButton|\Joomla\CMS\Toolbar\Button\LinkButton
since |
4.1.0 |
---|
Arguments
- url
string
The url to open- text
string
The text of button.- newWindow
bool
Whether to open the preview in _blank or just a modal
Response
\Joomla\CMS\Toolbar\Button\PopupButton|\Joomla\CMS\Toolbar\Button\LinkButton
link
Creates a button to redirect to a link.
link(string text, string url) : \Joomla\CMS\Toolbar\Button\LinkButton
since |
4.0.0 |
---|
Arguments
- text
string
Button text.- url
string
The link url.
Response
\Joomla\CMS\Toolbar\Button\LinkButton
linkButton
linkButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\LinkButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\LinkButton
loadButtonType
Loads a button type.
loadButtonType(string type, bool new = false) : false|\Joomla\CMS\Toolbar\ToolbarButton
since |
1.5 |
---|
Arguments
- type
string
Button Type- new
bool
False by default
Response
false|\Joomla\CMS\Toolbar\ToolbarButton
makeDefault
Writes a common 'default' button for a record.
makeDefault(string task, string text = 'JTOOLBAR_DEFAULT') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
An override for the task.- text
string
An override for the alt text.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
mediaManager
Writes a media_manager button.
mediaManager(string directory, string text = 'JTOOLBAR_UPLOAD') : \Joomla\CMS\Toolbar\Button\PopupButton
since |
4.0.0 |
---|
Arguments
- directory
string
The subdirectory to upload the media to.- text
string
An override for the alt text.
Response
\Joomla\CMS\Toolbar\Button\PopupButton
popupButton
popupButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\PopupButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\PopupButton
preferences
Writes a configuration button and invokes a cancel operation (eg a checkin).
preferences(string component, string text = 'JTOOLBAR_OPTIONS', string path = '') : \Joomla\CMS\Toolbar\Button\LinkButton
since |
4.0.0 |
---|
Arguments
- component
string
The name of the component, eg, com_content.- text
string
The text of this button.- path
string
An alternative path for the configuration xml relative to JPATH_SITE.
Response
\Joomla\CMS\Toolbar\Button\LinkButton
prependButton
Prepend a button to toolbar.
prependButton(\Joomla\CMS\Toolbar\ToolbarButton button, array args) : \Joomla\CMS\Toolbar\ToolbarButton|bool
since |
1.5 |
---|
Arguments
- button
\Joomla\CMS\Toolbar\ToolbarButton
The button instance.- args
array
The more arguments.
Response
\Joomla\CMS\Toolbar\ToolbarButton|bool
Return button instance to help chaining configure. If using legacy arguments
returns true
preview
Writes a preview button for a given option (opens a popup window).
preview(string url, string text = 'JGLOBAL_PREVIEW', bool newWindow = false) : \Joomla\CMS\Toolbar\Button\PopupButton|\Joomla\CMS\Toolbar\Button\LinkButton
since |
4.0.0 |
---|
Arguments
- url
string
The name of the popup file (excluding the file extension)- text
string
The text of button.- newWindow
bool
Whether to open the preview in _blank or just a modal
Response
\Joomla\CMS\Toolbar\Button\PopupButton|\Joomla\CMS\Toolbar\Button\LinkButton
publish
Writes a common 'publish' button.
publish(string task, string text = 'JTOOLBAR_PUBLISH') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
render
Render a toolbar.
render(array options = []) : string
throws |
|
---|---|
since |
1.5 |
Arguments
- options
array
The options of toolbar.
Response
string
HTML for the toolbar.
renderButton
Render a button.
renderButton(array &node) : string
since |
1.5 |
---|---|
throws |
|
Arguments
- node
array
A toolbar node.
Response
string
save
Writes a save button for a given option.
save(string task, string text = 'JTOOLBAR_SAVE') : \Joomla\CMS\Toolbar\Button\StandardButton
Save operation leads to a save and then close action.
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
save2copy
Writes a save as copy button for a given option.
save2copy(string task, string text = 'JTOOLBAR_SAVE_AS_COPY') : \Joomla\CMS\Toolbar\Button\StandardButton
Save as copy operation leads to a save after clearing the key, then returns user to edit mode with new key.
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
save2new
Writes a save and create new button for a given option.
save2new(string task, string text = 'JTOOLBAR_SAVE_AND_NEW') : \Joomla\CMS\Toolbar\Button\StandardButton
Save and create operation leads to a save and then add action.
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
separatorButton
separatorButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\SeparatorButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\SeparatorButton
setFactory
Set the factory instance
setFactory(\Joomla\CMS\Toolbar\ToolbarFactoryInterface factory) : $this
since |
4.0.0 |
---|
Arguments
- factory
\Joomla\CMS\Toolbar\ToolbarFactoryInterface
The factory instance
Response
$this
setItems
Set the button list.
setItems(\Joomla\CMS\Toolbar\ToolbarButton[] items) : static
since |
4.0.0 |
---|
Arguments
- items
\Joomla\CMS\Toolbar\ToolbarButton[]
The button list array.
Response
static
standardButton
standardButton(string name = '', string text = '', string task = '') : \Joomla\CMS\Toolbar\Button\StandardButton
Arguments
- name = ''
string
- text = ''
string
- task = ''
string
Response
\Joomla\CMS\Toolbar\Button\StandardButton
trash
Writes a common 'trash' button.
trash(string task, string text = 'JTOOLBAR_TRASH') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
unarchive
Writes a common 'unarchive' button.
unarchive(string task, string text = 'JTOOLBAR_UNARCHIVE') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
unpublish
Writes a common 'unpublish' button.
unpublish(string task, string text = 'JTOOLBAR_UNPUBLISH') : \Joomla\CMS\Toolbar\Button\StandardButton
since |
4.0.0 |
---|
Arguments
- task
string
The task name of this button.- text
string
The text of this button.
Response
\Joomla\CMS\Toolbar\Button\StandardButton
versions
Writes a version history
versions(string typeAlias, int itemId, int height = 800, int width = 500, string text = 'JTOOLBAR_VERSIONS') : \Joomla\CMS\Toolbar\Button\CustomButton
since |
4.0.0 |
---|
Arguments
- typeAlias
string
The component and type, for example 'com_content.article'- itemId
int
The id of the item, for example the article id.- height
int
The height of the popup.- width
int
The width of the popup.- text
string
The name of the button.
Response
\Joomla\CMS\Toolbar\Button\CustomButton