Back to Joomla project (class list)

Class ToolbarHelper - list of methods

Utility class for the button bar.
Package: Joomla\CMS\Toolbar
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Toolbar/ToolbarHelper.php
Project: Joomla

Method Summary

public static void
(mixed $title, mixed $icon = 'generic.png')

Title cell.
Parameters
  • string $title The title.
  • string $icon The space-separated names of the image.
Returns
  • void
Since
  • 1.5
Show source code of this method: title Source Code

public static void
(mixed $width = '')

Writes a spacer cell.
Parameters
  • string $width The width for the cell
Returns
  • void
Since
  • 1.5
Show source code of this method: spacer Source Code

public static void
()

Writes a divider between menu buttons
Returns
  • void
Since
  • 1.5
Show source code of this method: divider Source Code

public static void
(mixed $task = '', mixed $icon = '', mixed $iconOver = '', mixed $alt = '', mixed $listSelect = true, mixed $formId = null)

Writes a custom option and task button for the button bar.
Parameters
  • string $task The task to perform (picked up by the switch( $task ) blocks).
  • string $icon The image to display.
  • string $iconOver @deprecated 5.0
  • string $alt The alt text for the icon image.
  • bool $listSelect True if required to check that a standard list item is checked.
  • string $formId The id of action form.
Returns
  • void
Since
  • 1.5
Show source code of this method: custom Source Code

public static void
(mixed $url = '', mixed $updateEditors = false, mixed $icon = 'preview', mixed $bodyHeight = null, mixed $modalWidth = null)

Writes a preview button for a given option (opens a popup window).
Parameters
  • string $url The name of the popup file (excluding the file extension)
  • bool $updateEditors Unused
  • string $icon The image to display.
  • int $bodyHeight The body height of the preview popup
  • int $modalWidth The modal width of the preview popup
Returns
  • void
Since
  • 1.5
Show source code of this method: preview Source Code

public static void
(mixed $url = '', mixed $updateEditors = false, mixed $icon = 'icon-universal-access', mixed $bodyHeight = null, mixed $modalWidth = null)

Writes a jooa11y accessibility checker button for a given option (opens a popup window).
Parameters
  • string $url The url to open
  • bool $updateEditors Unused
  • string $icon The image to display.
  • int $bodyHeight The body height of the preview popup
  • int $modalWidth The modal width of the preview popup
Returns
  • void
Since
  • 4.1.0
Show source code of this method: jooa11y Source Code

public static void
(mixed $ref, mixed $com = false, mixed $override = null, mixed $component = null)

Writes a help button for a given option (opens a popup window).
Parameters
  • string $ref The name of the popup file (excluding the file extension for an xml file).
  • bool $com Use the help file in the component directory.
  • string $override Use this URL instead of any other
  • string $component Name of component to get Help (null for current component)
Returns
  • void
Since
  • 1.5
Show source code of this method: help Source Code

public static void
(string $class = "hide-aware-inline-help")

Writes a help button for showing/hiding the inline help of a form
Parameters
  • string $class The class used by the inline help items.
Returns
  • void
Since
  • 4.1.0
Show source code of this method: inlinehelp Source Code

public static void
(mixed $alt = 'JTOOLBAR_BACK', mixed $href = 'javascript:history.back();')

Writes a cancel button that will go back to the previous page without doing any other operation.
Parameters
  • string $alt Alternative text.
  • string $href URL of the href attribute.
Returns
  • void
Since
  • 1.5
Show source code of this method: back Source Code

public static void
(mixed $url, mixed $text, mixed $name = 'link')

Creates a button to redirect to a link
Parameters
  • string $url The link url
  • string $text Button text
  • string $name Name to be used as apart of the id
Returns
  • void
Since
  • 3.5
Show source code of this method: link Source Code

public static void
(mixed $directory = '', mixed $alt = 'JTOOLBAR_UPLOAD')

Writes a media_manager button.
Parameters
  • string $directory The subdirectory to upload the media to.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: media_manager Source Code

public static void
(mixed $task = 'default', mixed $alt = 'JTOOLBAR_DEFAULT')

Writes a common 'default' button for a record.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: makeDefault Source Code

public static void
(mixed $task = 'assign', mixed $alt = 'JTOOLBAR_ASSIGN')

Writes a common 'assign' button for a record.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: assign Source Code

public static void
(mixed $task = 'add', mixed $alt = 'JTOOLBAR_NEW', mixed $check = false)

Writes the common 'new' icon for the button bar.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True if required to check that a standard list item is checked.
Returns
  • void
Since
  • 1.5
Show source code of this method: addNew Source Code

public static void
(mixed $task = 'publish', mixed $alt = 'JTOOLBAR_PUBLISH', mixed $check = false)

Writes a common 'publish' button.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True if required to check that a standard list item is checked.
Returns
  • void
Since
  • 1.5
Show source code of this method: publish Source Code

public static void
(mixed $task = 'publish', mixed $alt = 'JTOOLBAR_PUBLISH')

Writes a common 'publish' button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: publishList Source Code

public static void
(mixed $task = 'unpublish', mixed $alt = 'JTOOLBAR_UNPUBLISH', mixed $check = false)

Writes a common 'unpublish' button.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True if required to check that a standard list item is checked.
Returns
  • void
Since
  • 1.5
Show source code of this method: unpublish Source Code

public static void
(mixed $task = 'unpublish', mixed $alt = 'JTOOLBAR_UNPUBLISH')

Writes a common 'unpublish' button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: unpublishList Source Code

public static void
(mixed $task = 'archive', mixed $alt = 'JTOOLBAR_ARCHIVE')

Writes a common 'archive' button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: archiveList Source Code

public static void
(mixed $task = 'unarchive', mixed $alt = 'JTOOLBAR_UNARCHIVE')

Writes an unarchive button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: unarchiveList Source Code

public static void
(mixed $task = 'edit', mixed $alt = 'JTOOLBAR_EDIT')

Writes a common 'edit' button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: editList Source Code

public static void
(mixed $task = 'edit_source', mixed $alt = 'JTOOLBAR_EDIT_HTML')

Writes a common 'edit' button for a template html.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: editHtml Source Code

public static void
(mixed $task = 'edit_css', mixed $alt = 'JTOOLBAR_EDIT_CSS')

Writes a common 'edit' button for a template css.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: editCss Source Code

public static void
(mixed $msg = '', mixed $task = 'remove', mixed $alt = 'JTOOLBAR_DELETE')

Writes a common 'delete' button for a list of records.
Parameters
  • string $msg Postscript for the 'are you sure' message.
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: deleteList Source Code

public static void
(mixed $task = 'remove', mixed $alt = 'JTOOLBAR_TRASH', mixed $check = true)

Writes a common 'trash' button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True to allow lists.
Returns
  • void
Since
  • 1.5
Show source code of this method: trash Source Code

public static void
(mixed $task = 'apply', mixed $alt = 'JTOOLBAR_APPLY')

Writes a save button for a given option.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: apply Source Code

public static void
(mixed $task = 'save', mixed $alt = 'JTOOLBAR_SAVE')

Writes a save button for a given option.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: save Source Code

public static void
(mixed $task = 'save2new', mixed $alt = 'JTOOLBAR_SAVE_AND_NEW')

Writes a save and create new button for a given option.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.6
Show source code of this method: save2new Source Code

public static void
(mixed $task = 'save2copy', mixed $alt = 'JTOOLBAR_SAVE_AS_COPY')

Writes a save as copy button for a given option.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.6
Show source code of this method: save2copy Source Code

public static void
(mixed $task = 'checkin', mixed $alt = 'JTOOLBAR_CHECKIN', mixed $check = true)

Writes a checkin button for a given option.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True if required to check that a standard list item is checked.
Returns
  • void
Since
  • 1.7
Show source code of this method: checkin Source Code

public static void
(mixed $task = 'cancel', mixed $alt = 'JTOOLBAR_CANCEL')

Writes a cancel button and invokes a cancel operation (eg a checkin).
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Show source code of this method: cancel Source Code

public static void
(mixed $component, mixed $height = 550, mixed $width = 875, mixed $alt = 'JTOOLBAR_OPTIONS', mixed $path = '')

Writes a configuration button and invokes a cancel operation (eg a checkin).
Parameters
  • string $component The name of the component, eg, com_content.
  • int $height The height of the popup. [UNUSED]
  • int $width The width of the popup. [UNUSED]
  • string $alt The name of the button.
  • string $path An alternative path for the configuration xml relative to JPATH_SITE.
Returns
  • void
Since
  • 1.5
Show source code of this method: preferences Source Code

public static void
(mixed $typeAlias, mixed $itemId, mixed $height = 800, mixed $width = 500, mixed $alt = 'JTOOLBAR_VERSIONS')

Writes a version history
Parameters
  • string $typeAlias The component and type, for example 'com_content.article'
  • int $itemId The id of the item, for example the article id.
  • int $height The height of the popup.
  • int $width The width of the popup.
  • string $alt The name of the button.
Returns
  • void
Since
  • 3.2
Show source code of this method: versions Source Code

public static void
(mixed $buttons = array(), mixed $class = 'btn-success')

Writes a save button for a given option, with an additional dropdown
Parameters
  • array $buttons An array of buttons
  • string $class The button class
Returns
  • void
Since
  • 4.0.0
Show source code of this method: saveGroup Source Code

public static void
(mixed $targetModalId, mixed $icon, mixed $alt, mixed $class = 'btn-primary')

Displays a modal button
Parameters
  • string $targetModalId ID of the target modal box
  • string $icon Icon class to show on modal button
  • string $alt Title for the modal button
  • string $class The button class
Returns
  • void
Since
  • 3.2
Show source code of this method: modal Source Code

Tags Summary

Since
1.5