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é
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe FOFToolbar
+ Graphe d'héritage de FOFToolbar:

Fonctions membres publiques

 __construct ($config=array())
 
 renderToolbar ($view=null, $task=null, $input=null)
 
 onCpanelsBrowse ()
 
 onBrowse ()
 
 onRead ()
 
 onAdd ()
 
 onEdit ()
 
 clearLinks ()
 
getLinks ()
 
 appendLink ($name, $link=null, $active=false, $icon=null, $parent='')
 
 prefixLink ($name, $link=null, $active=false, $icon=null)
 
 renderSubmenu ()
 
 getRenderFrontendButtons ()
 
 getRenderFrontendSubmenu ()
 

Fonctions membres publiques statiques

static & getAnInstance ($option=null, $config=array())
 

Champs de données

 $perms = array()
 

Fonctions membres protégées

 getMyViews ()
 

Attributs protégés

 $config = array()
 
 $input = array()
 
 $linkbar = array()
 
 $renderFrontendSubmenu = false
 
 $renderFrontendButtons = false
 

Fonctions membres privées

 renderFromConfig (array $toolbar)
 
 renderToolbarElement ($type, $value=null, array $attributes=array())
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $config = array())

Public constructor

Paramètres
array$configThe configuration array of the component

Références $config, elseif, et FOFPlatform\getInstance().

Documentation des fonctions membres

◆ appendLink()

appendLink (   $name,
  $link = null,
  $active = false,
  $icon = null,
  $parent = '' 
)

Append a link to the link bar

Paramètres
string$nameThe text of the link
string | null$linkThe link to render; set to null to render a separator
boolean$activeTrue if it's an active link
string | null$iconIcon class (used by some renderers, like the Bootstrap renderer)
string | null$parentThe parent element (referenced by name)) This will create a dropdown list
Renvoie
void

Références $active, $icon, $link, $name, et null.

◆ clearLinks()

clearLinks ( )

Removes all links from the link bar

Renvoie
void

◆ getAnInstance()

static& getAnInstance (   $option = null,
  $config = array() 
)
static

Gets an instance of a component's toolbar

Paramètres
string$optionThe name of the component
array$configThe configuration array for the component
Renvoie
FOFToolbar The toolbar instance for the component

Références $className, $config, $hash, $input, $option, $path, elseif, et FOFPlatform\getInstance().

Référencé par FOFViewHtml\preRender(), FOFRenderStrapper\renderButtons(), FOFRenderJoomla\renderButtons(), FOFRenderAbstract\renderCategoryLinkbar(), FOFRenderJoomla\renderLinkbar(), FOFRenderStrapper\renderLinkbar_classic(), et FOFRenderStrapper\renderLinkbar_joomla().

◆ getLinks()

& getLinks ( )

Get the link bar's link definitions

Renvoie
array

◆ getMyViews()

getMyViews ( )
protected

Automatically detects all views of the component

Renvoie
array A list of all views, in the order to be displayed in the toolbar submenu

Références $cpanel, $files, $folder, $view, FOFUtilsArray\getColumn(), FOFPlatform\getInstance(), FOFInflector\pluralize(), et FOFUtilsArray\sortObjects().

◆ getRenderFrontendButtons()

getRenderFrontendButtons ( )

Return the front-end toolbar rendering flag

Renvoie
boolean

◆ getRenderFrontendSubmenu()

getRenderFrontendSubmenu ( )

Return the front-end submenu rendering flag

Renvoie
boolean

◆ onAdd()

onAdd ( )

Renders the toolbar for the component's Add pages

Renvoie
void

Références $option, FOFPlatform\getInstance(), FOFInflector\pluralize(), et title.

◆ onBrowse()

onBrowse ( )

Renders the toolbar for the component's Browse pages (the plural views)

Renvoie
void

Références $option, FOFPlatform\getInstance(), et title.

◆ onCpanelsBrowse()

onCpanelsBrowse ( )

Renders the toolbar for the component's Control Panel page

Renvoie
void

Références $option, FOFPlatform\getInstance(), et title.

◆ onEdit()

onEdit ( )

Renders the toolbar for the component's Edit pages

Renvoie
void

Références FOFPlatform\getInstance().

◆ onRead()

onRead ( )

Renders the toolbar for the component's Read pages

Renvoie
void

Références $option, FOFPlatform\getInstance(), et title.

◆ prefixLink()

prefixLink (   $name,
  $link = null,
  $active = false,
  $icon = null 
)

Prefixes (some people erroneously call this "prepend" – there is no such word) a link to the link bar

Paramètres
string$nameThe text of the link
string | null$linkThe link to render; set to null to render a separator
boolean$activeTrue if it's an active link
string | null$iconIcon class (used by some renderers, like the Bootstrap renderer)
Renvoie
void

Références $active, $icon, $link, et $name.

◆ renderFromConfig()

renderFromConfig ( array  $toolbar)
private

Render the toolbar from the configuration.

Paramètres
array$toolbarThe toolbar definition
Renvoie
void

Références $toolbar, $value, FOFPlatform\getInstance(), et null.

◆ renderSubmenu()

renderSubmenu ( )

Renders the submenu (toolbar links) for all detected views of this component

Renvoie
void

Références $active, $key, $link, $name, $view, FOFInflector\isPlural(), FOFInflector\pluralize(), et FOFInflector\singularize().

◆ renderToolbar()

renderToolbar (   $view = null,
  $task = null,
  $input = null 
)

Renders the toolbar for the current view and task

Paramètres
string$viewThe view of the component
string$taskThe exact task of the view
FOFInput$inputAn optional input object used to determine the defaults
Renvoie
void

Références $component, $input, $task, $toolbar, $view, FOFInflector\pluralize(), task, et view.

◆ renderToolbarElement()

renderToolbarElement (   $type,
  $value = null,
array  $attributes = array() 
)
private

Render a toolbar element.

Paramètres
string$typeThe element type.
mixed$valueThe element value.
array$attributesThe element attributes.
@return  void
Exceptions
InvalidArgumentException

Références $alt, $attributes, $check, $component, $height, $href, $icon, $path, $task, $type, $url, $value, $width, null, title, et FOFStringUtils\toBool().

Documentation des champs

◆ $config

$config = array()
protected

◆ $input

$input = array()
protected

◆ $linkbar

$linkbar = array()
protected

◆ $perms

$perms = array()

◆ $renderFrontendButtons

$renderFrontendButtons = false
protected

◆ $renderFrontendSubmenu

$renderFrontendSubmenu = false
protected

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