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