CoreButtonsTrait
Enhance Toolbar class to add more pre-defined methods.
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
addNew
Writes the common 'new' icon for the button bar.
addNew( task, 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
apply
Writes a save button for a given option.
apply( task, 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
archive
Writes a common 'archive' button.
archive( task, 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
assign
Writes a common 'assign' button for a record.
assign( task, 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
back
Writes a cancel button that will go back to the previous page without doing any other operation.
back( text = 'JTOOLBAR_BACK') : \Joomla\CMS\Toolbar\Button\LinkButton
cancel
Writes a cancel button and invokes a cancel operation (eg a checkin).
cancel( task, 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
checkin
Writes a checkin button for a given option.
checkin( task, 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
customHtml
Writes a custom HTML to toolbar.
customHtml( html, 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
delete
Writes a common 'delete' button.
delete( task, 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
divider
Writes a divider between dropdown menu items.
divider( text = '') : \Joomla\CMS\Toolbar\Button\SeparatorButton
edit
Writes a common 'edit' button.
edit( task, 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
editCss
Writes a common 'editCss' button.
editCss( task, 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
editHtml
Writes a common 'editHtml' button.
editHtml( task, 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
help
Writes a help button for a given option (opens a popup window).
help( ref, useComponent = false, url = null, 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
inlinehelp
Writes a help button for a given option (opens a popup window).
inlinehelp( class = 'hide-aware-inline-help') : \Joomla\CMS\Toolbar\Button\InlinehelpButton
since |
4.3.0 |
---|
Arguments
- class
string
The class used by the inline help items.
Response
jooa11y
Writes a jooa11y accessibility checker button for a given option (opens a popup window).
jooa11y( url, text = 'JGLOBAL_JOOA11Y', 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
link
Creates a button to redirect to a link.
link( text, url) : \Joomla\CMS\Toolbar\Button\LinkButton
makeDefault
Writes a common 'default' button for a record.
makeDefault( task, 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
mediaManager
Writes a media_manager button.
mediaManager( directory, 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
preferences
Writes a configuration button and invokes a cancel operation (eg a checkin).
preferences( component, text = 'JTOOLBAR_OPTIONS', 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
preview
Writes a preview button for a given option (opens a popup window).
preview( url, text = 'JGLOBAL_PREVIEW', 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
publish
Writes a common 'publish' button.
publish( task, 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
save
Writes a save button for a given option.
save( task, 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
save2copy
Writes a save as copy button for a given option.
save2copy( task, 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
save2new
Writes a save and create new button for a given option.
save2new( task, 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
trash
Writes a common 'trash' button.
trash( task, 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
unarchive
Writes a common 'unarchive' button.
unarchive( task, 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
unpublish
Writes a common 'unpublish' button.
unpublish( task, 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
versions
Writes a version history
versions( typeAlias, itemId, height = 800, width = 500, 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.