ActionButton

The TaskButton class.

since

4.0.0

package

Joomla CMS

Methods

__construct

ActionButton constructor.

__construct(array options = []) : mixed
since

4.0.0

Arguments

options

arrayThe options for all buttons in this group.

Response

mixed

__toString

Render to string.

__toString() : string
since

4.0.0

Response

string

addState

Add a state profile.

addState(int value, string task, string icon = 'ok', string title = '', array options = []) : static
since

4.0.0

Arguments

value

intThe value of this state.

task

stringThe task you want to execute after click this button.

icon

stringThe icon to display for user.

title

stringTitle text will show if we enable tooltips.

options

arrayThe button options, will override group options.

Response

staticReturn self to support chaining.

fetchIconClass

Method to get the CSS class name for an icon identifier.

fetchIconClass(string identifier) : string

Can be redefined in the final class.

since

4.0.0

Arguments

identifier

stringIcon identification string.

Response

stringCSS class name.

getLayout

Method to get property layout.

getLayout() : string
since

4.0.0

Response

string

getOption

Get an option value.

getOption(string name, mixed default = null) : mixed
since

4.0.0

Arguments

name

stringThe option name.

default

mixedDefault value if not exists.

Response

mixedReturn option value or default value.

getOptions

Method to get property options.

getOptions() : array
since

4.0.0

Response

array

getState

Get state profile by value name.

getState(int value) : array|null
since

4.0.0

Arguments

value

intThe value name we want to get.

Response

array|nullReturn state profile or NULL.

preprocess

Configure this object.

preprocess() : void
since

4.0.0

removeState

Remove a state by value name.

removeState(int value) : static
since

4.0.0

Arguments

value

intRemove state by this value.

Response

staticReturn to support chaining.

render

Render action button by item value.

render(int|null value = null, int|null row = null, array options = []) : string
since

4.0.0

throws

\InvalidArgumentException

Arguments

value

int|nullCurrent value of this item.

row

int|nullThe row number of this item.

options

arrayThe options to override group options.

Response

stringRendered HTML.

setLayout

Method to set property template.

setLayout(string layout) : static
since

4.0.0

Arguments

layout

stringThe layout path.

Response

staticReturn self to support chaining.

setOption

Set option value.

setOption(string name, mixed value) : static
since

4.0.0

Arguments

name

stringThe option name.

value

mixedThe option value.

Response

staticReturn self to support chaining.

setOptions

Method to set property options.

setOptions(array options) : static
since

4.0.0

Arguments

options

arrayThe options of this button group.

Response

staticReturn self to support chaining.

Properties

states

The button states profiles.

since

4.0.0

Type(s)

array

unknownState

Default options for unknown state.

since

4.0.0

Type(s)

array

options

Options of this button set.

since

4.0.0

Type(s)

\Joomla\Registry\Registry

layout

The layout path to render.

since

4.0.0

Type(s)

string