[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Toolbar/ -> ToolbarButton.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: 518 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 20 functions

  __construct()
  prepareOptions()
  render()
  renderButton()
  fetchId()
  fetchIconClass()
  getParent()
  setParent()
  getOptions()
  setOptions()
  getOption()
  setOption()
  getName()
  name()
  getLayout()
  layout()
  ensureUniqueId()
  __call()
  findOptionName()
  getAccessors()

Functions
Functions that are not part of a class:

__construct(string $name = '', string $text = '', array $options = [])   X-Ref
Init this class.

param: string  $name     Name of this button.
param: string  $text     The button text, will auto translate.
param: array   $options  Button options.

prepareOptions(array &$options)   X-Ref
Prepare options for this button.

param: array  &$options  The options about this button.
return: void

render(&$definition = null)   X-Ref
Get the HTML to render the button

param: array  &$definition  Parameters to be passed
return: string

renderButton(array &$options)   X-Ref
Render button HTML.

param: array  &$options  The button options.
return: string  The button HTML.

fetchId()   X-Ref
Get the button CSS Id.

return: string  Button CSS Id

fetchIconClass($identifier)   X-Ref
Method to get the CSS class name for an icon identifier

Can be redefined in the final class

param: string  $identifier  Icon identification string
return: string  CSS class name

getParent()   X-Ref
Get parent toolbar instance.

return: Toolbar

setParent(Toolbar $parent)   X-Ref
Set parent Toolbar instance.

param: Toolbar  $parent  The parent Toolbar instance to set.
return: static  Return self to support chaining.

getOptions()   X-Ref
Get button options.

return: array

setOptions(array $options)   X-Ref
Set all options.

param: array  $options  The button options.
return: static  Return self to support chaining.

getOption(string $name, $default = null)   X-Ref
Get single option value.

param: string  $name     The option name.
param: mixed   $default  The default value if this name not exists.
return: mixed

setOption(string $name, $value)   X-Ref
Set option value.

param: string  $name   The option name to store value.
param: mixed   $value  The option value.
return: static

getName()   X-Ref
Get button name.

return: string

name(string $name)   X-Ref
Set button name.

param: string  $name  The button name.
return: static  Return self to support chaining.

getLayout()   X-Ref
Get layout path.

return: string

layout(string $layout)   X-Ref
Set layout path.

param: string  $layout  The layout path name to render.
return: static  Return self to support chaining.

ensureUniqueId(string $id)   X-Ref
Make sure the id is unique

param: string  $id  The id string.
return: string

__call(string $name, array $args)   X-Ref
Magiix method to adapt option accessors.

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

findOptionName(string $name)   X-Ref
Find field option name from accessors.

param: string  $name  The field name.
return: boolean|string

getAccessors()   X-Ref
Method to configure available option accessors.

return: array



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