ActionButton

The TaskButton class.

since

4.0.0

package

Joomla CMS

Methods

__construct

ActionButton constructor.

__construct(mixed||string|int options = []) : 
since

4.0.0

Arguments

options

array<string|int, mixed>The options for all buttons in this group.

Response

mixed

__toString

Render to string.

__toString() : 
since

4.0.0

Response

string

addState

Add a state profile.

addState( value,  task,  icon = 'ok',  title = '', mixed||string|int options = []) : 
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

array<string|int, mixed>The 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( identifier) : 

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() : 
since

4.0.0

Response

string

getOption

Get an option value.

getOption( name,  default = null) : 
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() : mixed||string|int
since

4.0.0

Response

array<string|int, mixed>

getState

Get state profile by value name.

getState( value) : array|null
since

4.0.0

Arguments

value

intThe value name we want to get.

Response

array<string|int, mixed>|nullReturn state profile or NULL.

preprocess

Configure this object.

preprocess() : 
since

4.0.0

Response

void

removeState

Remove a state by value name.

removeState( value) : 
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, mixed||string|int options = []) : 
since

4.0.0

throws

InvalidArgumentException

Arguments

value

int|nullCurrent value of this item.

row

int|nullThe row number of this item.

options

array<string|int, mixed>The options to override group options.

Response

stringRendered HTML.

setLayout

Method to set property template.

setLayout( layout) : 
since

4.0.0

Arguments

layout

stringThe layout path.

Response

staticReturn self to support chaining.

setOption

Set option value.

setOption( name,  value) : 
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(mixed||string|int options) : 
since

4.0.0

Arguments

options

array<string|int, mixed>The options of this button group.

Response

staticReturn self to support chaining.

Properties

states

The button states profiles.

since

4.0.0

Type(s)

array<string|int, mixed>

unknownState

Default options for unknown state.

since

4.0.0

Type(s)

array<string|int, mixed>

options

Options of this button set.

since

4.0.0

Type(s)

Registry

layout

The layout path to render.

since

4.0.0

Type(s)

string