Icon

Icon object, holds all information for one icon, identified by the "identifier" property.

Is available to render itself as string.

Table of Contents

Constants

SIZE_DEFAULT  = 'default'
SIZE_LARGE  = 'large'
SIZE_OVERLAY  = 'overlay'
SIZE_SMALL  = 'small'

Properties

$alternativeMarkups  : array<string|int, mixed>
$dimension  : Dimension
$identifier  : string
The identifier which the PHP code that calls the IconFactory hands over
$markup  : string
$overlayIcon  : Icon|null
The identifier for a possible overlay icon
$size  : string
Contains the size string ("large", "small" or "default")
$spinning  : bool
Flag to indicate if the icon has a spinning animation
$state  : IconState
Contains the state information

Methods

__toString()  : string
Render the icon as HTML code
getAlternativeMarkup()  : string
getDimension()  : Dimension
getIdentifier()  : string
getMarkup()  : string
getOverlayIcon()  : Icon|null
getSize()  : string
getState()  : IconState
isSpinning()  : bool
render()  : string
Render the icon as HTML code
setAlternativeMarkup()  : mixed
setIdentifier()  : mixed
setMarkup()  : mixed
setOverlayIcon()  : mixed
setSize()  : mixed
Sets the size and creates the new dimension
setSpinning()  : mixed
setState()  : mixed
Sets the state of the icon
wrappedIcon()  : string
Wrap icon markup in unified HTML code

Constants

SIZE_DEFAULT

public string SIZE_DEFAULT = 'default'

the default size

SIZE_LARGE

public string SIZE_LARGE = 'large'

the large size

SIZE_OVERLAY

public string SIZE_OVERLAY = 'overlay'

the overlay size, which depends on icon size

Internal

SIZE_SMALL

public string SIZE_SMALL = 'small'

the small size

Properties

$alternativeMarkups

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

$identifier

The identifier which the PHP code that calls the IconFactory hands over

protected string $identifier

$overlayIcon

The identifier for a possible overlay icon

protected Icon|null $overlayIcon

$size

Contains the size string ("large", "small" or "default")

protected string $size = ''

$spinning

Flag to indicate if the icon has a spinning animation

protected bool $spinning = false

Methods

__toString()

Render the icon as HTML code

public __toString() : string
Return values
string

getAlternativeMarkup()

public getAlternativeMarkup(string $markupIdentifier) : string
Parameters
$markupIdentifier : string
Return values
string

getIdentifier()

public getIdentifier() : string
Return values
string

getMarkup()

public getMarkup([string $alternativeMarkupIdentifier = null ]) : string
Parameters
$alternativeMarkupIdentifier : string = null
Internal

this method is used for internal processing, to get the prepared and final markup use render()

Return values
string

getSize()

public getSize() : string
Return values
string

isSpinning()

public isSpinning() : bool
Return values
bool

render()

Render the icon as HTML code

public render([string $alternativeMarkupIdentifier = null ]) : string
Parameters
$alternativeMarkupIdentifier : string = null
Return values
string

setAlternativeMarkup()

public setAlternativeMarkup(string $markupIdentifier, string $markup) : mixed
Parameters
$markupIdentifier : string
$markup : string

setIdentifier()

public setIdentifier(string $identifier) : mixed
Parameters
$identifier : string

setMarkup()

public setMarkup(string $markup) : mixed
Parameters
$markup : string

setOverlayIcon()

public setOverlayIcon(Icon $overlayIcon) : mixed
Parameters
$overlayIcon : Icon

setSize()

Sets the size and creates the new dimension

public setSize(string $size) : mixed
Parameters
$size : string

setSpinning()

public setSpinning(bool $spinning) : mixed
Parameters
$spinning : bool

wrappedIcon()

Wrap icon markup in unified HTML code

protected wrappedIcon([string $alternativeMarkupIdentifier = null ]) : string
Parameters
$alternativeMarkupIdentifier : string = null
Return values
string

        
On this page

Search results