AbstractButton extends AbstractControl implements ButtonInterface

AbstractButton

Table of Contents

Interfaces

ButtonInterface
Interface for buttons

Properties

$classes  : string
HTML tag attribute for class
$dataAttributes  : array<string|int, mixed>
HTML tag attributes for data-* Use key => value pairs
$disabled  : bool
Disabled state of the button
$icon  : Icon
Icon object
$showLabelText  : bool
Defines whether to show the title as a label within the button
$title  : string
HTML tag attribute for title

Methods

__toString()  : string
Implementation from ButtonInterface This object is an abstract, so no implementation is necessary
getClasses()  : string
Get classes
getDataAttributes()  : array<string|int, mixed>
Get Data attributes
getIcon()  : Icon
Get icon
getShowLabelText()  : bool
Show Label text
getTitle()  : string
Get Title
getType()  : string
Get type
isDisabled()  : bool
Check if button is disabled
isValid()  : bool
Implementation from ButtonInterface This object is an abstract, so no implementation is necessary
render()  : string
Implementation from ButtonInterface This object is an abstract, so no implementation is necessary
setClasses()  : $this
Set classes
setDataAttributes()  : $this
Set Data attributes
setDisabled()  : AbstractButton
Set if button needs to be disabled
setIcon()  : $this
Set icon
setShowLabelText()  : $this
Show Label text
setTitle()  : $this
Set title attribute

Properties

$classes

HTML tag attribute for class

protected string $classes = ''

$dataAttributes

HTML tag attributes for data-* Use key => value pairs

protected array<string|int, mixed> $dataAttributes = []

$disabled

Disabled state of the button

protected bool $disabled = false

$showLabelText

Defines whether to show the title as a label within the button

protected bool $showLabelText = false

$title

HTML tag attribute for title

protected string $title = ''

Methods

__toString()

Implementation from ButtonInterface This object is an abstract, so no implementation is necessary

public __toString() : string
Return values
string

getClasses()

Get classes

public getClasses() : string
Return values
string

getDataAttributes()

Get Data attributes

public getDataAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getShowLabelText()

Show Label text

public getShowLabelText() : bool
Return values
bool

getTitle()

Get Title

public getTitle() : string
Return values
string

getType()

Get type

public getType() : string
Return values
string

isDisabled()

Check if button is disabled

public isDisabled() : bool
Return values
bool

isValid()

Implementation from ButtonInterface This object is an abstract, so no implementation is necessary

public isValid() : bool
Return values
bool

render()

Implementation from ButtonInterface This object is an abstract, so no implementation is necessary

public render() : string
Return values
string

setClasses()

Set classes

public setClasses(string $classes) : $this
Parameters
$classes : string

HTML class attribute to set

Return values
$this

setDataAttributes()

Set Data attributes

public setDataAttributes(array<string|int, mixed> $dataAttributes) : $this
Parameters
$dataAttributes : array<string|int, mixed>

HTML data attributes to set

Return values
$this

setIcon()

Set icon

public setIcon(Icon $icon) : $this
Parameters
$icon : Icon

Icon object for the button

Return values
$this

setShowLabelText()

Show Label text

public setShowLabelText(bool $showLabelText) : $this
Parameters
$showLabelText : bool
Return values
$this

setTitle()

Set title attribute

public setTitle(string $title) : $this
Parameters
$title : string

HTML title attribute to set

Return values
$this

        
On this page

Search results