Documentation

iconHelper

View helper with Icon

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2011-2022, Stefan Seehafer

license

http://www.gnu.org/licenses/gpl.txt GPLv3

Table of Contents

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

Properties

$iconOnly

Show icon only

protected bool $iconOnly = false

$iconStack

Icon stack class

protected string $iconStack = ''

$spinner

Spinner class for icon

protected string $spinner = ''
Tags
since
4.2

$stackTop

Move stack icon to top

protected bool $stackTop = false

Methods

setIcon()

Set icon

public setIcon(string $icon[, string $prefix = 'fa' ][, bool $useFa = 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([string $iconOnly = true ]) : $this
Parameters
$iconOnly : string = true
Return values
$this

setSize()

Set Icon size

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

Auto-add FontAwesome Icon classes

Return values
$this

setSpinner()

Set flag icon has spinner

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

setStack()

Set if icon is stacked

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

Auto-add FontAwesome Icon classes

Return values
$this

setStackTop()

Move stack icon to top

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

getIconString()

Return full icon string

protected getIconString() : string
Return values
string

Search results