ToolbarHelper
class ToolbarHelper
Utility class for the button bar.
Methods
Title cell.
Writes a spacer cell.
Writes a divider between menu buttons
Writes a custom option and task button for the button bar.
Writes a preview button for a given option (opens a popup window).
Writes a preview button for a given option (opens a popup window).
Writes a cancel button that will go back to the previous page without doing any other operation.
Creates a button to redirect to a link
Writes a media_manager button.
Writes a common 'default' button for a record.
Writes a common 'assign' button for a record.
Writes the common 'new' icon for the button bar.
Writes a common 'publish' button.
Writes a common 'publish' button for a list of records.
Writes a common 'unpublish' button.
Writes a common 'unpublish' button for a list of records.
Writes a common 'archive' button for a list of records.
Writes an unarchive button for a list of records.
Writes a common 'edit' button for a list of records.
Writes a common 'edit' button for a template html.
Writes a common 'edit' button for a template css.
Writes a common 'delete' button for a list of records.
Writes a common 'trash' button for a list of records.
Writes a save button for a given option.
Writes a save button for a given option.
Writes a save and create new button for a given option.
Writes a save as copy button for a given option.
Writes a checkin button for a given option.
Writes a cancel button and invokes a cancel operation (eg a checkin).
Writes a configuration button and invokes a cancel operation (eg a checkin).
Writes a version history
Displays a modal button
Details
static
void
title(
string $title,
string $icon = 'generic.png')
Title cell.
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.
static
void
custom(
string $task = '',
string $icon = '',
string $iconOver = '',
string $alt = '',
bool $listSelect = true)
Writes a custom option and task button for the button bar.
static
void
preview(
string $url = '',
bool $updateEditors = false)
Writes a preview button for a given option (opens a popup window).
static
void
help(
string $ref,
bool $com = false,
string $override = null,
string $component = null)
Writes a preview button for a given option (opens a popup window).
static
void
back(
string $alt = 'JTOOLBAR_BACK',
string $href = 'javascript:history.back();')
Writes a cancel button that will go back to the previous page without doing any other operation.
static
void
link(
string $url,
string $text,
string $name = 'link')
Creates a button to redirect to a link
static
void
media_manager(
string $directory = '',
string $alt = 'JTOOLBAR_UPLOAD')
Writes a media_manager button.
static
void
makeDefault(
string $task = 'default',
string $alt = 'JTOOLBAR_DEFAULT')
Writes a common 'default' button for a record.
static
void
assign(
string $task = 'assign',
string $alt = 'JTOOLBAR_ASSIGN')
Writes a common 'assign' button for a record.
static
void
addNew(
string $task = 'add',
string $alt = 'JTOOLBAR_NEW',
boolean $check = false)
Writes the common 'new' icon for the button bar.
static
void
publish(
string $task = 'publish',
string $alt = 'JTOOLBAR_PUBLISH',
boolean $check = false)
Writes a common 'publish' button.
static
void
publishList(
string $task = 'publish',
string $alt = 'JTOOLBAR_PUBLISH')
Writes a common 'publish' button for a list of records.
static
void
unpublish(
string $task = 'unpublish',
string $alt = 'JTOOLBAR_UNPUBLISH',
boolean $check = false)
Writes a common 'unpublish' button.
static
void
unpublishList(
string $task = 'unpublish',
string $alt = 'JTOOLBAR_UNPUBLISH')
Writes a common 'unpublish' button for a list of records.
static
void
archiveList(
string $task = 'archive',
string $alt = 'JTOOLBAR_ARCHIVE')
Writes a common 'archive' button for a list of records.
static
void
unarchiveList(
string $task = 'unarchive',
string $alt = 'JTOOLBAR_UNARCHIVE')
Writes an unarchive button for a list of records.
static
void
editList(
string $task = 'edit',
string $alt = 'JTOOLBAR_EDIT')
Writes a common 'edit' button for a list of records.
static
void
editHtml(
string $task = 'edit_source',
string $alt = 'JTOOLBAR_EDIT_HTML')
Writes a common 'edit' button for a template html.
static
void
editCss(
string $task = 'edit_css',
string $alt = 'JTOOLBAR_EDIT_CSS')
Writes a common 'edit' button for a template css.
static
void
deleteList(
string $msg = '',
string $task = 'remove',
string $alt = 'JTOOLBAR_DELETE')
Writes a common 'delete' button for a list of records.
static
void
trash(
string $task = 'remove',
string $alt = 'JTOOLBAR_TRASH',
bool $check = true)
Writes a common 'trash' button for a list of records.
static
void
apply(
string $task = 'apply',
string $alt = 'JTOOLBAR_APPLY')
Writes a save button for a given option.
Apply operation leads to a save action only (does not leave edit mode).
static
void
save(
string $task = 'save',
string $alt = 'JTOOLBAR_SAVE')
Writes a save button for a given option.
Save operation leads to a save and then close action.
static
void
save2new(
string $task = 'save2new',
string $alt = 'JTOOLBAR_SAVE_AND_NEW')
Writes a save and create new button for a given option.
Save and create operation leads to a save and then add action.
static
void
save2copy(
string $task = 'save2copy',
string $alt = 'JTOOLBAR_SAVE_AS_COPY')
Writes a save as copy button for a given option.
Save as copy operation leads to a save after clearing the key, then returns user to edit mode with new key.
static
void
checkin(
string $task = 'checkin',
string $alt = 'JTOOLBAR_CHECKIN',
boolean $check = true)
Writes a checkin button for a given option.
static
void
cancel(
string $task = 'cancel',
string $alt = 'JTOOLBAR_CANCEL')
Writes a cancel button and invokes a cancel operation (eg a checkin).
static
void
preferences(
string $component,
integer $height = '550',
integer $width = '875',
string $alt = 'JToolbar_Options',
string $path = '')
Writes a configuration button and invokes a cancel operation (eg a checkin).