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
SIZE_SMALL
public
string
SIZE_SMALL
= 'small'
the small size
Properties
$alternativeMarkups
protected
array<string|int, mixed>
$alternativeMarkups
= []
$dimension
protected
Dimension
$dimension
$identifier
The identifier which the PHP code that calls the IconFactory hands over
protected
string
$identifier
$markup
protected
string
$markup
$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
$state
Contains the state information
protected
IconState
$state
Methods
__toString()
Render the icon as HTML code
public
__toString() : string
Return values
stringgetAlternativeMarkup()
public
getAlternativeMarkup(string $markupIdentifier) : string
Parameters
- $markupIdentifier : string
Return values
stringgetDimension()
public
getDimension() : Dimension
Return values
DimensiongetIdentifier()
public
getIdentifier() : string
Return values
stringgetMarkup()
public
getMarkup([string $alternativeMarkupIdentifier = null ]) : string
Parameters
- $alternativeMarkupIdentifier : string = null
this method is used for internal processing, to get the prepared and final markup use render()
Return values
stringgetOverlayIcon()
public
getOverlayIcon() : Icon|null
Return values
Icon|nullgetSize()
public
getSize() : string
Return values
stringgetState()
public
getState() : IconState
Return values
IconStateisSpinning()
public
isSpinning() : bool
Return values
boolrender()
Render the icon as HTML code
public
render([string $alternativeMarkupIdentifier = null ]) : string
Parameters
- $alternativeMarkupIdentifier : string = null
Return values
stringsetAlternativeMarkup()
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
setState()
Sets the state of the icon
public
setState(IconState $state) : mixed
Parameters
- $state : IconState
wrappedIcon()
Wrap icon markup in unified HTML code
protected
wrappedIcon([string $alternativeMarkupIdentifier = null ]) : string
Parameters
- $alternativeMarkupIdentifier : string = null