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
int
The value of this state.- task
string
The task you want to execute after click this button.- icon
string
The icon to display for user.- title
string
Title text will show if we enable tooltips.- options
array<string|int, mixed>
The button options, will override group options.
Response
static
Return 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
string
Icon identification string.
Response
string
CSS 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
string
The option name.- default
mixed
Default value if not exists.
Response
mixed
Return 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
int
The value name we want to get.
Response
array<string|int, mixed>|null
Return 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
int
Remove state by this value.
Response
static
Return 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 |
|
Arguments
- value
int|null
Current value of this item.- row
int|null
The row number of this item.- options
array<string|int, mixed>
The options to override group options.
Response
string
Rendered HTML.
setLayout
Method to set property template.
setLayout( layout) :
since |
4.0.0 |
---|
Arguments
- layout
string
The layout path.
Response
static
Return self to support chaining.
setOption
Set option value.
setOption( name, value) :
since |
4.0.0 |
---|
Arguments
- name
string
The option name.- value
mixed
The option value.
Response
static
Return 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
static
Return 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