ToolbarHelper
Utility class for the button bar.
| since |
1.5 |
|---|---|
| package |
Joomla CMS |
Methods
addNew
Writes the common 'new' icon for the button bar.
addNew( task = 'add', alt = 'JTOOLBAR_NEW', check = false) :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.- check
boolTrue if required to check that a standard list item is checked.
Response
void
apply
Writes a save button for a given option.
apply( task = 'apply', alt = 'JTOOLBAR_APPLY') :
Apply operation leads to a save action only (does not leave edit mode).
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
archiveList
Writes a common 'archive' button for a list of records.
archiveList( task = 'archive', alt = 'JTOOLBAR_ARCHIVE') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
assign
Writes a common 'assign' button for a record.
assign( task = 'assign', alt = 'JTOOLBAR_ASSIGN') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
back
Writes a cancel button that will go back to the previous page without doing any other operation.
back( alt = 'JTOOLBAR_BACK', href = 'javascript:history.back();') :
| since |
1.5 |
|---|
Arguments
- alt
stringAlternative text.- href
stringURL of the href attribute.
Response
void
cancel
Writes a cancel button and invokes a cancel operation (eg a checkin).
cancel( task = 'cancel', alt = 'JTOOLBAR_CANCEL') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
checkin
Writes a checkin button for a given option.
checkin( task = 'checkin', alt = 'JTOOLBAR_CHECKIN', check = true) :
| since |
1.7 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.- check
boolTrue if required to check that a standard list item is checked.
Response
void
custom
Writes a custom option and task button for the button bar.
custom( task = '', icon = '', iconOver = '', alt = '', listSelect = true, formId = null) :
| since |
1.5 |
|---|
Arguments
- task
stringThe task to perform (picked up by the switch($task) blocks).- icon
stringThe image to display.- iconOver
string@deprecated 4.3 will be removed in 6.0- alt
stringThe alt text for the icon image.- listSelect
boolTrue if required to check that a standard list item is checked.- formId
stringThe id of action form.
Response
void
deleteList
Writes a common 'delete' button for a list of records.
deleteList( msg = '', task = 'remove', alt = 'JTOOLBAR_DELETE') :
| since |
1.5 |
|---|
Arguments
- msg
stringPostscript for the 'are you sure' message.- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
divider
Writes a divider between menu buttons
divider() :
| since |
1.5 |
|---|
Response
void
editCss
Writes a common 'edit' button for a template css.
editCss( task = 'edit_css', alt = 'JTOOLBAR_EDIT_CSS') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
editHtml
Writes a common 'edit' button for a template html.
editHtml( task = 'edit_source', alt = 'JTOOLBAR_EDIT_HTML') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
editList
Writes a common 'edit' button for a list of records.
editList( task = 'edit', alt = 'JTOOLBAR_EDIT') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
help
Writes a help button for a given option (opens a popup window).
help( ref, com = false, override = null, component = null) :
| since |
1.5 |
|---|
Arguments
- ref
stringThe name of the popup file (excluding the file extension for an xml file).- com
boolUse the help file in the component directory.- override
stringUse this URL instead of any other- component
stringName of component to get Help (null for current component)
Response
void
inlinehelp
Writes a help button for showing/hiding the inline help of a form
inlinehelp( class = "hide-aware-inline-help") :
| since |
4.1.0 |
|---|
Arguments
- class
stringThe class used by the inline help items.
Response
void
jooa11y
Writes a jooa11y accessibility checker button for a given option (opens a popup window).
jooa11y( url = '', updateEditors = false, icon = 'icon-universal-access', bodyHeight = null, modalWidth = null) :
| since |
4.1.0 |
|---|
Arguments
- url
stringThe url to open- updateEditors
boolUnused- icon
stringThe image to display.- bodyHeight
intThe body height of the preview popup- modalWidth
intThe modal width of the preview popup
Response
void
link
Creates a button to redirect to a link
link( url, text, name = 'link') :
| since |
3.5 |
|---|
Arguments
- url
stringThe link url- text
stringButton text- name
stringName to be used as apart of the id
Response
void
makeDefault
Writes a common 'default' button for a record.
makeDefault( task = 'default', alt = 'JTOOLBAR_DEFAULT') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
media_manager
Writes a media_manager button.
media_manager( directory = '', alt = 'JTOOLBAR_UPLOAD') :
| since |
1.5 |
|---|
Arguments
- directory
stringThe subdirectory to upload the media to.- alt
stringAn override for the alt text.
Response
void
modal
Displays a modal button
modal( targetModalId, icon, alt, class = 'btn-primary') :
| since |
3.2 |
|---|
Arguments
- targetModalId
stringID of the target modal box- icon
stringIcon class to show on modal button- alt
stringTitle for the modal button- class
stringThe button class
Response
void
preferences
Writes a configuration button and invokes a cancel operation (eg a checkin).
preferences( component, height = 550, width = 875, alt = 'JTOOLBAR_OPTIONS', path = '') :
| since |
1.5 |
|---|
Arguments
- component
stringThe name of the component, eg, com_content.- height
intThe height of the popup. [UNUSED]- width
intThe width of the popup. [UNUSED]- alt
stringThe name of the button.- path
stringAn alternative path for the configuration xml relative to JPATH_SITE.
Response
void
preview
Writes a preview button for a given option (opens a popup window).
preview( url = '', updateEditors = false, icon = 'preview', bodyHeight = null, modalWidth = null) :
| since |
1.5 |
|---|
Arguments
- url
stringThe name of the popup file (excluding the file extension)- updateEditors
boolUnused- icon
stringThe image to display.- bodyHeight
intThe body height of the preview popup- modalWidth
intThe modal width of the preview popup
Response
void
publish
Writes a common 'publish' button.
publish( task = 'publish', alt = 'JTOOLBAR_PUBLISH', check = false) :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.- check
boolTrue if required to check that a standard list item is checked.
Response
void
publishList
Writes a common 'publish' button for a list of records.
publishList( task = 'publish', alt = 'JTOOLBAR_PUBLISH') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
save
Writes a save button for a given option.
save( task = 'save', alt = 'JTOOLBAR_SAVE') :
Save operation leads to a save and then close action.
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
save2copy
Writes a save as copy button for a given option.
save2copy( task = 'save2copy', alt = 'JTOOLBAR_SAVE_AS_COPY') :
Save as copy operation leads to a save after clearing the key, then returns user to edit mode with new key.
| since |
1.6 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
save2new
Writes a save and create new button for a given option.
save2new( task = 'save2new', alt = 'JTOOLBAR_SAVE_AND_NEW') :
Save and create operation leads to a save and then add action.
| since |
1.6 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
saveGroup
Writes a save button for a given option, with an additional dropdown
saveGroup(mixed||string|int buttons = [], class = 'btn-success') :
| since |
4.0.0 |
|---|
Arguments
- buttons
array<string|int, mixed>An array of buttons- class
stringThe button class
Response
void
spacer
Writes a spacer cell.
spacer( width = '') :
| since |
1.5 |
|---|
Arguments
- width
stringThe width for the cell
Response
void
title
Title cell.
title( title, icon = 'generic.png') :
For the title and toolbar to be rendered correctly, this title function must be called before the starttable function and the toolbars icons this is due to the nature of how the css has been used to position the title in respect to the toolbar.
| since |
1.5 |
|---|
Arguments
- title
stringThe title.- icon
stringThe space-separated names of the image.
Response
void
trash
Writes a common 'trash' button for a list of records.
trash( task = 'remove', alt = 'JTOOLBAR_TRASH', check = true) :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.- check
boolTrue to allow lists.
Response
void
unarchiveList
Writes an unarchive button for a list of records.
unarchiveList( task = 'unarchive', alt = 'JTOOLBAR_UNARCHIVE') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
unpublish
Writes a common 'unpublish' button.
unpublish( task = 'unpublish', alt = 'JTOOLBAR_UNPUBLISH', check = false) :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.- check
boolTrue if required to check that a standard list item is checked.
Response
void
unpublishList
Writes a common 'unpublish' button for a list of records.
unpublishList( task = 'unpublish', alt = 'JTOOLBAR_UNPUBLISH') :
| since |
1.5 |
|---|
Arguments
- task
stringAn override for the task.- alt
stringAn override for the alt text.
Response
void
versions
Writes a version history
versions( typeAlias, itemId, height = 800, width = 500, alt = 'JTOOLBAR_VERSIONS') :
| since |
3.2 |
|---|
Arguments
- typeAlias
stringThe component and type, for example 'com_content.article'- itemId
intThe id of the item, for example the article id.- height
intThe height of the popup.- width
intThe width of the popup.- alt
stringThe name of the button.
Response
void