Back to Joomla project (class list)

Class ActionButton - list of methods

The TaskButton class.

Direct known subclasses

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

Method Summary

public
(array $options = [])

ActionButton constructor.
Parameters
  • array $options The options for all buttons in this group.
Since
  • 4.0.0
Show source code of this method: __construct Source Code

protected void
()

Configure this object.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: preprocess Source Code

public static
(int $value, string $task, string $icon = 'ok', string $title = '', array $options = [])

Add a state profile.
Parameters
  • int $value The value of this state.
  • string $task The task you want to execute after click this button.
  • string $icon The icon to display for user.
  • string $title Title text will show if we enable tooltips.
  • array $options The button options, will override group options.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: addState Source Code

public array|null
(int $value)

Get state profile by value name.
Parameters
  • int $value The value name we want to get.
Returns
  • array|null Return state profile or NULL.
Since
  • 4.0.0
Show source code of this method: getState Source Code

public static
(int $value)

Remove a state by value name.
Parameters
  • int $value Remove state by this value.
Returns
  • static Return to support chaining.
Since
  • 4.0.0
Show source code of this method: removeState Source Code

public string
(?int $value = null, ?int $row = null, array $options = [])

Render action button by item value.
Parameters
  • int|null $value Current value of this item.
  • int|null $row The row number of this item.
  • array $options The options to override group options.
Returns
  • string Rendered HTML.
Since
  • 4.0.0
-
  • \InvalidArgumentException
Show source code of this method: render Source Code

public string
()

Render to string.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: __toString Source Code

public string
()

Method to get property layout.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: getLayout Source Code

public static
(string $layout)

Method to set property template.
Parameters
  • string $layout The layout path.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: setLayout Source Code

public array
()

Method to get property options.
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getOptions Source Code

public static
(array $options)

Method to set property options.
Parameters
  • array $options The options of this button group.
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 an option value.
Parameters
  • string $name The option name.
  • mixed $default Default value if not exists.
Returns
  • mixed Return option value or default value.
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.
  • mixed $value The option value.
Returns
  • static Return self to support chaining.
Since
  • 4.0.0
Show source code of this method: setOption Source Code

public string
(string $identifier)

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

Properties Summary

protected array
$states
The button states profiles.
Since
  • 4.0.0
protected array
$unknownState
Default options for unknown state.
Since
  • 4.0.0
protected \Joomla\Registry\Registry
$options
Options of this button set.
Since
  • 4.0.0
protected string
$layout
The layout path to render.
Since
  • 4.0.0

Tags Summary

Since
4.0.0