Documentation

iconHelper

View helper with Icon

Table of Contents

$icon Icon class string
$iconOnly Show icon only bool
$iconStack Button text string
$stackTop Move stack icon to top bool
$size Button text string
$spinner Spinner class for icon string
setIcon() Set icon $this
setIconOnly() Set button to display icon only $this
setStack() Set if icon is stacked $this
setSize() Set Icon size $this
setStackTop() Move stack icon to top $this
setSpinner() Set flag icon has spinner $this
getIconString() Return full icon string string

Properties

$iconOnly

Show icon only

protected bool $iconOnly = false

$iconStack

Button text

protected string $iconStack = ''

$stackTop

Move stack icon to top

protected bool $stackTop = false

$spinner

Spinner class for icon

protected string $spinner = ''

Methods

setIcon()

Set icon

public setIcon( $icon : string [, $prefix : string = 'fa' ] [, $useFa : bool = true ] ) : $this
Parameters
$icon : string

Icon CSS classes

$prefix : string = 'fa'

Icon prefix

$useFa : bool = true

Auto-add FontAwesome Icon classes

Return values
$this

setIconOnly()

Set button to display icon only

public setIconOnly( $iconOnly : string ) : $this
Parameters
$iconOnly : string
Return values
$this

setStack()

Set if icon is stacked

public setStack( $iconStack : string [, $useFa : bool = true ] ) : $this
Parameters
$iconStack : string
$useFa : bool = true

Auto-add FontAwesome Icon classes

Return values
$this

setSize()

Set Icon size

public setSize( $size : string [, $useFa : bool = true ] ) : $this
Parameters
$size : string
$useFa : bool = true

Auto-add FontAwesome Icon classes

Return values
$this

setStackTop()

Move stack icon to top

public setStackTop( $stackTop : bool ) : $this
Parameters
$stackTop : bool
Return values
$this

setSpinner()

Set flag icon has spinner

public setSpinner( $spinner : string [, $useFa : bool = true ] ) : $this
Parameters
$spinner : string
$useFa : bool = true
Return values
$this

getIconString()

Return full icon string

protected getIconString( ) : string
Return values
string

Search results