Back to Joomla project (class list)

Class ToolbarButton - list of methods

The ToolbarButton class.

Direct known subclasses

Package: Joomla\CMS\Toolbar
Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Toolbar/ToolbarButton.php
Project: Joomla

Method Summary

public
(string $name = '', string $text = '', array $options = [])

Init this class.
Parameters
  • string $name Name of this button.
  • string $text The button text, will auto translate.
  • array $options Button options.
Since
  • 4.0.0
-
  • \InvalidArgumentException
Show source code of this method: __construct Source Code

protected void
(array &$options)

Prepare options for this button.
Parameters
  • array & $options The options about this button.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: prepareOptions Source Code

public string
(mixed &$definition = null)

Get the HTML to render the button
Parameters
  • array & $definition Parameters to be passed
Returns
  • string
Since
  • 3.0
-
  • \Exception
Show source code of this method: render Source Code

protected string
(array &$options)

Render button HTML.
Parameters
  • array & $options The button options.
Returns
  • string The button HTML.
Since
  • 4.0.0
Show source code of this method: renderButton Source Code

protected string
()

Get the button CSS Id.
Returns
  • string Button CSS Id
Since
  • 3.0
Show source code of this method: fetchId Source Code

public string
(mixed $identifier)

Method to get the CSS class name for an icon identifier
Parameters
  • string $identifier Icon identification string
Returns
  • string CSS class name
Since
  • 3.0
Show source code of this method: fetchIconClass Source Code

public string
()

Get the button
Returns
  • string
Since
  • 3.0
Deprecated
  • 5.0
Show source code of this method: fetchButton Source Code

public \Joomla\CMS\Toolbar\Toolbar
()

Get parent toolbar instance.
Returns
  • \Joomla\CMS\Toolbar\Toolbar
Since
  • 4.0.0
Show source code of this method: getParent Source Code

public static
(\Joomla\CMS\Toolbar\Toolbar $parent)

Set parent Toolbar instance.
Parameters
  • \Joomla\CMS\Toolbar\Toolbar $parent The parent Toolbar instance to set.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: setParent Source Code

public array
()

Get button options.
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getOptions Source Code

public static
(array $options)

Set all options.
Parameters
  • array $options The button options.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: setOptions Source Code

public mixed
(string $name, mixed $default = null)

Get single option value.
Parameters
  • string $name The option name.
  • mixed $default The default value if this name not exists.
Returns
  • mixed
Since
  • 4.0.0
Show source code of this method: getOption Source Code

public static
(string $name, mixed $value)

Set option value.
Parameters
  • string $name The option name to store value.
  • mixed $value The option value.
Returns
  • static
Since
  • 4.0.0
Show source code of this method: setOption Source Code

public string
()

Get button name.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: getName Source Code

public static
(string $name)

Set button name.
Parameters
  • string $name The button name.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: name Source Code

public string
()

Get layout path.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: getLayout Source Code

public static
(string $layout)

Set layout path.
Parameters
  • string $layout The layout path name to render.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: layout Source Code

protected string
(string $id)

Make sure the id is unique
Parameters
  • string $id The id string.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: ensureUniqueId Source Code

public mixed
(string $name, array $args)

Magiix method to adapt option accessors.
Parameters
  • string $name The method name.
  • array $args The method arguments.
Returns
  • mixed
Since
  • 4.0.0
-
  • \LogicException
Show source code of this method: __call Source Code

private static bool|string
(string $name)

Find field option name from accessors.
Parameters
  • string $name The field name.
Returns
  • bool|string
Since
  • 4.0.0
Show source code of this method: findOptionName Source Code

protected static array
()

Method to configure available option accessors.
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getAccessors Source Code

Properties Summary

protected string
$name
Name of this button.
Since
  • 4.0.0
protected \Joomla\CMS\Toolbar\Toolbar
$parent
Reference to the object that instantiated the element
Since
  • 4.0.0
protected string
$layout
The layout path to render this button.
Since
  • 4.0.0
protected array
$options
Button options.
Since
  • 4.0.0
protected static array
$idCounter
Used to track an ids, to avoid duplication
Since
  • 4.0.0

Tags Summary

public self
text (string $value)
public self
task (string $value)
public self
icon (string $value)
public self
buttonClass (string $value)
public self
attributes (array $value)
public self
onclick (array $value)
public self
listCheck (bool $value)
public self
listCheckMessage (string $value)
public self
form (string $value)
public self
formValidation (bool $value)
public string
getText ()
public string
getTask ()
public string
getIcon ()
public string
getButtonClass ()
public array
getAttributes ()
public string
getOnclick ()
public bool
getListCheck ()
public string
getListCheckMessage ()
public string
getForm ()
public bool
getFormValidation ()
Since
4.0.0
OSZAR »