[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

Joomla! Content Management System

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

Defines 1 class

Toolbar:: (15 methods):
  __construct()
  getInstance()
  setFactory()
  appendButton()
  getItems()
  setItems()
  getName()
  prependButton()
  render()
  renderButton()
  loadButtonType()
  addButtonPath()
  getButtonPath()
  createChild()
  __call()


Class: Toolbar  - X-Ref

ToolBar handler

__construct($name = 'toolbar', ToolbarFactoryInterface $factory = null)   X-Ref
Constructor

param: string                   $name     The toolbar name.
param: ToolbarFactoryInterface  $factory  The toolbar factory.

getInstance($name = 'toolbar')   X-Ref
Returns the global Toolbar object, only creating it if it doesn't already exist.

param: string  $name  The name of the toolbar.
return: Toolbar  The Toolbar object.

setFactory(ToolbarFactoryInterface $factory)   X-Ref
Set the factory instance

param: ToolbarFactoryInterface  $factory  The factory instance
return: $this

appendButton($button, ...$args)   X-Ref
Append a button to toolbar.

param: ToolbarButton  $button  The button instance.
param: array          $args    The more arguments.
return: ToolbarButton|boolean  Return button instance to help chaining configure. If using legacy arguments

getItems()   X-Ref
Get the list of toolbar links.

return: array

setItems(array $items)   X-Ref
Set the button list.

param: ToolbarButton[]  $items  The button list array.
return: static

getName()   X-Ref
Get the name of the toolbar.

return: string

prependButton($button, ...$args)   X-Ref
Prepend a button to toolbar.

param: ToolbarButton  $button  The button instance.
param: array          $args    The more arguments.
return: ToolbarButton|boolean  Return button instance to help chaining configure. If using legacy arguments

render(array $options = [])   X-Ref
Render a toolbar.

param: array  $options  The options of toolbar.
return: string  HTML for the toolbar.

renderButton(&$node)   X-Ref
Render a button.

param: array  &$node  A toolbar node.
return: string

loadButtonType($type, $new = false)   X-Ref
Loads a button type.

param: string   $type  Button Type
param: boolean  $new   False by default
return: false|ToolbarButton

addButtonPath($path)   X-Ref
Add a directory where Toolbar should search for button types in LIFO order.

You may either pass a string or an array of directories.

Toolbar will be searching for an element type in the same order you
added them. If the parameter type cannot be found in the custom folders,
it will look in libraries/joomla/html/toolbar/button.

param: mixed  $path  Directory or directories to search.
return: void

getButtonPath()   X-Ref
Get the lookup paths for button objects

return: array

createChild($name)   X-Ref
Create child toolbar.

param: string  $name  The toolbar name.
return: static

__call($name, $args)   X-Ref
Magic method proxy.

param: string  $name  The method name.
param: array   $args  The method arguments.
return: ToolbarButton



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