[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Toolbar/ -> CoreButtonsTrait.php (summary)

Joomla! Content Management System

Copyright: (C) 2018 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 548 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 28 functions

  divider()
  preview()
  jooa11y()
  help()
  back()
  link()
  mediaManager()
  makeDefault()
  assign()
  addNew()
  publish()
  unpublish()
  archive()
  unarchive()
  edit()
  editHtml()
  editCss()
  delete()
  trash()
  apply()
  save()
  save2new()
  save2copy()
  checkin()
  cancel()
  preferences()
  versions()
  customHtml()

Functions
Functions that are not part of a class:

divider(string $text = '')   X-Ref
Writes a divider between dropdown menu items.

param: string  $text  The text of button.
return: SeparatorButton

preview(string $url, string $text = 'JGLOBAL_PREVIEW', $newWindow = false)   X-Ref
Writes a preview button for a given option (opens a popup window).

param: string  $url        The name of the popup file (excluding the file extension)
param: string  $text       The text of button.
param: bool    $newWindow  Whether to open the preview in _blank or just a modal
return: PopupButton|LinkButton

jooa11y(string $url, string $text = 'JGLOBAL_JOOA11Y', $newWindow = false)   X-Ref
Writes a jooa11y accessibility checker button for a given option (opens a popup window).

param: string  $url        The url to open
param: string  $text       The text of button.
param: bool    $newWindow  Whether to open the preview in _blank or just a modal
return: PopupButton|LinkButton

help($ref, $useComponent = false, $url = null, $component = null)   X-Ref
Writes a help button for a given option (opens a popup window).

param: string  $ref           The name of the popup file (excluding the file extension for an xml file).
param: bool    $useComponent  Use the help file in the component directory.
param: string  $url           Use this URL instead of any other.
param: string  $component     Name of component to get Help (null for current component)
return: HelpButton

back(string $text = 'JTOOLBAR_BACK')   X-Ref
Writes a cancel button that will go back to the previous page without doing
any other operation.

param: string  $text  The text of button.
return: LinkButton

link(string $text, string $url)   X-Ref
Creates a button to redirect to a link.

param: string  $text  Button text.
param: string  $url   The link url.
return: LinkButton

mediaManager(string $directory, string $text = 'JTOOLBAR_UPLOAD')   X-Ref
Writes a media_manager button.

param: string  $directory  The subdirectory to upload the media to.
param: string  $text       An override for the alt text.
return: PopupButton

makeDefault(string $task, string $text = 'JTOOLBAR_DEFAULT')   X-Ref
Writes a common 'default' button for a record.

param: string  $task  An override for the task.
param: string  $text  An override for the alt text.
return: StandardButton

assign(string $task, string $text = 'JTOOLBAR_ASSIGN')   X-Ref
Writes a common 'assign' button for a record.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

addNew(string $task, string $text = 'JTOOLBAR_NEW')   X-Ref
Writes the common 'new' icon for the button bar.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

publish(string $task, string $text = 'JTOOLBAR_PUBLISH')   X-Ref
Writes a common 'publish' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

unpublish(string $task, string $text = 'JTOOLBAR_UNPUBLISH')   X-Ref
Writes a common 'unpublish' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

archive(string $task, string $text = 'JTOOLBAR_ARCHIVE')   X-Ref
Writes a common 'archive' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

unarchive(string $task, string $text = 'JTOOLBAR_UNARCHIVE')   X-Ref
Writes a common 'unarchive' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

edit(string $task, string $text = 'JTOOLBAR_EDIT')   X-Ref
Writes a common 'edit' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

editHtml(string $task, string $text = 'JTOOLBAR_EDIT_HTML')   X-Ref
Writes a common 'editHtml' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

editCss(string $task, string $text = 'JTOOLBAR_EDIT_CSS')   X-Ref
Writes a common 'editCss' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

delete(string $task, string $text = 'JTOOLBAR_DELETE')   X-Ref
Writes a common 'delete' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: ConfirmButton

trash(string $task, string $text = 'JTOOLBAR_TRASH')   X-Ref
Writes a common 'trash' button.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

apply(string $task, string $text = 'JTOOLBAR_APPLY')   X-Ref
Writes a save button for a given option.
Apply operation leads to a save action only (does not leave edit mode).

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

save(string $task, string $text = 'JTOOLBAR_SAVE')   X-Ref
Writes a save button for a given option.
Save operation leads to a save and then close action.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

save2new(string $task, string $text = 'JTOOLBAR_SAVE_AND_NEW')   X-Ref
Writes a save and create new button for a given option.
Save and create operation leads to a save and then add action.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

save2copy(string $task, string $text = 'JTOOLBAR_SAVE_AS_COPY')   X-Ref
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: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

checkin(string $task, string $text = 'JTOOLBAR_CHECKIN')   X-Ref
Writes a checkin button for a given option.

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

cancel(string $task, string $text = 'JTOOLBAR_CLOSE')   X-Ref
Writes a cancel button and invokes a cancel operation (eg a checkin).

param: string  $task  The task name of this button.
param: string  $text  The text of this button.
return: StandardButton

preferences(string $component, string $text = 'JTOOLBAR_OPTIONS', string $path = '')   X-Ref
Writes a configuration button and invokes a cancel operation (eg a checkin).

param: string  $component  The name of the component, eg, com_content.
param: string  $text       The text of this button.
param: string  $path       An alternative path for the configuration xml relative to JPATH_SITE.
return: LinkButton

versions(string $typeAlias,int $itemId,int $height = 800,int $width = 500,string $text = 'JTOOLBAR_VERSIONS')   X-Ref
Writes a version history

param: string   $typeAlias  The component and type, for example 'com_content.article'
param: integer  $itemId     The id of the item, for example the article id.
param: integer  $height     The height of the popup.
param: integer  $width      The width of the popup.
param: string   $text       The name of the button.
return: CustomButton

customHtml(string $html, string $name = 'custom')   X-Ref
Writes a custom HTML to toolbar.

param: string  $html  The HTML string to write.
param: string  $name  The button name.
return: CustomButton



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer