Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe ToolbarHelper

Fonctions membres publiques statiques

static title ($title, $icon='generic.png')
 
static spacer ($width='')
 
static divider ()
 
static custom ($task='', $icon='', $iconOver='', $alt='', $listSelect=true)
 
static preview ($url='', $updateEditors=false)
 
static help ($ref, $com=false, $override=null, $component=null)
 
static back ($alt='JTOOLBAR_BACK', $href='javascript:history.back();')
 
static link ($url, $text, $name='link')
 
static media_manager ($directory='', $alt='JTOOLBAR_UPLOAD')
 
static makeDefault ($task='default', $alt='JTOOLBAR_DEFAULT')
 
static assign ($task='assign', $alt='JTOOLBAR_ASSIGN')
 
static addNew ($task='add', $alt='JTOOLBAR_NEW', $check=false)
 
static publish ($task='publish', $alt='JTOOLBAR_PUBLISH', $check=false)
 
static publishList ($task='publish', $alt='JTOOLBAR_PUBLISH')
 
static unpublish ($task='unpublish', $alt='JTOOLBAR_UNPUBLISH', $check=false)
 
static unpublishList ($task='unpublish', $alt='JTOOLBAR_UNPUBLISH')
 
static archiveList ($task='archive', $alt='JTOOLBAR_ARCHIVE')
 
static unarchiveList ($task='unarchive', $alt='JTOOLBAR_UNARCHIVE')
 
static editList ($task='edit', $alt='JTOOLBAR_EDIT')
 
static editHtml ($task='edit_source', $alt='JTOOLBAR_EDIT_HTML')
 
static editCss ($task='edit_css', $alt='JTOOLBAR_EDIT_CSS')
 
static deleteList ($msg='', $task='remove', $alt='JTOOLBAR_DELETE')
 
static trash ($task='remove', $alt='JTOOLBAR_TRASH', $check=true)
 
static apply ($task='apply', $alt='JTOOLBAR_APPLY')
 
static save ($task='save', $alt='JTOOLBAR_SAVE')
 
static save2new ($task='save2new', $alt='JTOOLBAR_SAVE_AND_NEW')
 
static save2copy ($task='save2copy', $alt='JTOOLBAR_SAVE_AS_COPY')
 
static checkin ($task='checkin', $alt='JTOOLBAR_CHECKIN', $check=true)
 
static cancel ($task='cancel', $alt='JTOOLBAR_CANCEL')
 
static preferences ($component, $height='550', $width='875', $alt='JToolbar_Options', $path='')
 
static versions ($typeAlias, $itemId, $height=800, $width=500, $alt='JTOOLBAR_VERSIONS')
 
static modal ($targetModalId, $icon, $alt)
 

Description détaillée

Utility class for the button bar.

Depuis
1.5

Documentation des fonctions membres

◆ addNew()

static addNew (   $task = 'add',
  $alt = 'JTOOLBAR_NEW',
  $check = false 
)
static

Writes the common 'new' icon for the button bar.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
boolean$checkTrue if required to check that a standard list item is checked.
Renvoie
void
Depuis
1.5

Références $alt, $check, $task, et Toolbar\getInstance().

◆ apply()

static apply (   $task = 'apply',
  $alt = 'JTOOLBAR_APPLY' 
)
static

Writes a save button for a given option. Apply operation leads to a save action only (does not leave edit mode).

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ archiveList()

static archiveList (   $task = 'archive',
  $alt = 'JTOOLBAR_ARCHIVE' 
)
static

Writes a common 'archive' button for a list of records.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ assign()

static assign (   $task = 'assign',
  $alt = 'JTOOLBAR_ASSIGN' 
)
static

Writes a common 'assign' button for a record.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ back()

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

Writes a cancel button that will go back to the previous page without doing any other operation.

Paramètres
string$altAlternative text.
string$hrefURL of the href attribute.
Renvoie
void
Depuis
1.5

Références $alt, $href, et Toolbar\getInstance().

◆ cancel()

static cancel (   $task = 'cancel',
  $alt = 'JTOOLBAR_CANCEL' 
)
static

Writes a cancel button and invokes a cancel operation (eg a checkin).

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ checkin()

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

Writes a checkin button for a given option.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
boolean$checkTrue if required to check that a standard list item is checked.
Renvoie
void
Depuis
1.7

Références $alt, $check, $task, et Toolbar\getInstance().

◆ custom()

static custom (   $task = '',
  $icon = '',
  $iconOver = '',
  $alt = '',
  $listSelect = true 
)
static

Writes a custom option and task button for the button bar.

Paramètres
string$taskThe task to perform (picked up by the switch($task) blocks).
string$iconThe image to display.
string$iconOverThe image to display when moused over.
string$altThe alt text for the icon image.
bool$listSelectTrue if required to check that a standard list item is checked.
Renvoie
void
Depuis
1.5

Références $alt, $icon, $task, et Toolbar\getInstance().

◆ deleteList()

static deleteList (   $msg = '',
  $task = 'remove',
  $alt = 'JTOOLBAR_DELETE' 
)
static

Writes a common 'delete' button for a list of records.

Paramètres
string$msgPostscript for the 'are you sure' message.
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ divider()

static divider ( )
static

Writes a divider between menu buttons

Renvoie
void
Depuis
1.5

Références Toolbar\getInstance().

◆ editCss()

static editCss (   $task = 'edit_css',
  $alt = 'JTOOLBAR_EDIT_CSS' 
)
static

Writes a common 'edit' button for a template css.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ editHtml()

static editHtml (   $task = 'edit_source',
  $alt = 'JTOOLBAR_EDIT_HTML' 
)
static

Writes a common 'edit' button for a template html.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ editList()

static editList (   $task = 'edit',
  $alt = 'JTOOLBAR_EDIT' 
)
static

Writes a common 'edit' button for a list of records.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ help()

static help (   $ref,
  $com = false,
  $override = null,
  $component = null 
)
static

Writes a preview button for a given option (opens a popup window).

Paramètres
string$refThe name of the popup file (excluding the file extension for an xml file).
bool$comUse the help file in the component directory.
string$overrideUse this URL instead of any other
string$componentName of component to get Help (null for current component)
Renvoie
void
Depuis
1.5

Références $component, et Toolbar\getInstance().

◆ link()

static link (   $url,
  $text,
  $name = 'link' 
)
static

Creates a button to redirect to a link

Paramètres
string$urlThe link url
string$textButton text
string$nameName to be used as apart of the id
Renvoie
void
Depuis
3.5

Références $name, $text, $url, et Toolbar\getInstance().

◆ makeDefault()

static makeDefault (   $task = 'default',
  $alt = 'JTOOLBAR_DEFAULT' 
)
static

Writes a common 'default' button for a record.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ media_manager()

static media_manager (   $directory = '',
  $alt = 'JTOOLBAR_UPLOAD' 
)
static

Writes a media_manager button.

Paramètres
string$directoryThe subdirectory to upload the media to.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, et Toolbar\getInstance().

◆ modal()

static modal (   $targetModalId,
  $icon,
  $alt 
)
static

Displays a modal button

Paramètres
string$targetModalIdID of the target modal box
string$iconIcon class to show on modal button
string$altTitle for the modal button
Renvoie
void
Depuis
3.2

Références $alt, $icon, $title, Text\_(), et Toolbar\getInstance().

◆ preferences()

static preferences (   $component,
  $height = '550',
  $width = '875',
  $alt = 'JToolbar_Options',
  $path = '' 
)
static

Writes a configuration button and invokes a cancel operation (eg a checkin).

Paramètres
string$componentThe name of the component, eg, com_content.
integer$heightThe height of the popup. [UNUSED]
integer$widthThe width of the popup. [UNUSED]
string$altThe name of the button.
string$pathAn alternative path for the configuation xml relative to JPATH_SITE.
Renvoie
void
Depuis
1.5

Références $alt, $component, $path, $return, $uri, Uri\getInstance(), et Toolbar\getInstance().

◆ preview()

static preview (   $url = '',
  $updateEditors = false 
)
static

Writes a preview button for a given option (opens a popup window).

Paramètres
string$urlThe name of the popup file (excluding the file extension)
bool$updateEditorsUnused
Renvoie
void
Depuis
1.5

Références $url, et Toolbar\getInstance().

◆ publish()

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

Writes a common 'publish' button.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
boolean$checkTrue if required to check that a standard list item is checked.
Renvoie
void
Depuis
1.5

Références $alt, $check, $task, et Toolbar\getInstance().

◆ publishList()

static publishList (   $task = 'publish',
  $alt = 'JTOOLBAR_PUBLISH' 
)
static

Writes a common 'publish' button for a list of records.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ save()

static save (   $task = 'save',
  $alt = 'JTOOLBAR_SAVE' 
)
static

Writes a save button for a given option. Save operation leads to a save and then close action.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ save2copy()

static save2copy (   $task = 'save2copy',
  $alt = 'JTOOLBAR_SAVE_AS_COPY' 
)
static

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.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.6

Références $alt, $task, et Toolbar\getInstance().

◆ save2new()

static save2new (   $task = 'save2new',
  $alt = 'JTOOLBAR_SAVE_AND_NEW' 
)
static

Writes a save and create new button for a given option. Save and create operation leads to a save and then add action.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.6

Références $alt, $task, et Toolbar\getInstance().

◆ spacer()

static spacer (   $width = '')
static

Writes a spacer cell.

Paramètres
string$widthThe width for the cell
Renvoie
void
Depuis
1.5

Références $width, et Toolbar\getInstance().

◆ title()

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

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.

Paramètres
string$titleThe title.
string$iconThe space-separated names of the image.
Renvoie
void
Depuis
1.5

Références $app, $html, $icon, $layout, $title, Text\_(), Factory\getApplication(), et Factory\getDocument().

◆ trash()

static trash (   $task = 'remove',
  $alt = 'JTOOLBAR_TRASH',
  $check = true 
)
static

Writes a common 'trash' button for a list of records.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
bool$checkTrue to allow lists.
Renvoie
void
Depuis
1.5

Références $alt, $check, $task, et Toolbar\getInstance().

◆ unarchiveList()

static unarchiveList (   $task = 'unarchive',
  $alt = 'JTOOLBAR_UNARCHIVE' 
)
static

Writes an unarchive button for a list of records.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ unpublish()

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

Writes a common 'unpublish' button.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
boolean$checkTrue if required to check that a standard list item is checked.
Renvoie
void
Depuis
1.5

Références $alt, $check, $task, et Toolbar\getInstance().

◆ unpublishList()

static unpublishList (   $task = 'unpublish',
  $alt = 'JTOOLBAR_UNPUBLISH' 
)
static

Writes a common 'unpublish' button for a list of records.

Paramètres
string$taskAn override for the task.
string$altAn override for the alt text.
Renvoie
void
Depuis
1.5

Références $alt, $task, et Toolbar\getInstance().

◆ versions()

static versions (   $typeAlias,
  $itemId,
  $height = 800,
  $width = 500,
  $alt = 'JTOOLBAR_VERSIONS' 
)
static

Writes a version history

Paramètres
string$typeAliasThe component and type, for example 'com_content.article'
integer$itemIdThe id of the item, for example the article id.
integer$heightThe height of the popup.
integer$widthThe width of the popup.
string$altThe name of the button.
Renvoie
void
Depuis
3.2

Références $alt, $height, $itemId, $lang, $layout, $options, $width, Text\_(), Toolbar\getInstance(), Table\getInstance(), Factory\getLanguage(), et JPATH_ADMINISTRATOR.


La documentation de cette classe a été générée à partir du fichier suivant :