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_MEDIUM = 'medium'
- SIZE_MEGA = 'mega'
- 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 : IconSize
- Contains the size string ("large", "small" or "default")
- $spinning : bool
- Flag to indicate if the icon has a spinning animation
- $state : IconState|null
- Contains the state information
- $title : string|null
- The title rendered to the icon
Methods
- __toString() : string
- getAlternativeMarkup() : string
- getDimension() : Dimension
- getIdentifier() : string
- getMarkup() : string
- getOverlayIcon() : Icon|null
- getSize() : string
- getState() : IconState
- getTitle() : string|null
- isSpinning() : bool
- render() : string
- setAlternativeMarkup() : $this
- setIdentifier() : $this
- setMarkup() : $this
- setOverlayIcon() : $this
- setSize() : self
- Sets the size and creates the new dimension
- setSpinning() : $this
- setState() : $this
- setTitle() : $this
- wrappedIcon() : string
- Wrap icon markup in unified HTML code
Constants
SIZE_DEFAULT
Use TYPO3\CMS\Core\Imaging\IconSize::DEFAULT instead
public
string
SIZE_DEFAULT
= 'default'
the default size
SIZE_LARGE
Use TYPO3\CMS\Core\Imaging\IconSize::LARGE instead
public
string
SIZE_LARGE
= 'large'
the large size
SIZE_MEDIUM
Use TYPO3\CMS\Core\Imaging\IconSize::MEDIUM instead
public
string
SIZE_MEDIUM
= 'medium'
the default size
SIZE_MEGA
Use TYPO3\CMS\Core\Imaging\IconSize::MEGA instead
public
string
SIZE_MEGA
= 'mega'
the mega size
SIZE_OVERLAY
public
string
SIZE_OVERLAY
= 'overlay'
the overlay size, which depends on icon size
SIZE_SMALL
Use TYPO3\CMS\Core\Imaging\IconSize::SMALL instead
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
= null
$size
Contains the size string ("large", "small" or "default")
protected
IconSize
$size
$spinning
Flag to indicate if the icon has a spinning animation
protected
bool
$spinning
= false
$state
Contains the state information
protected
IconState|null
$state
$title
The title rendered to the icon
protected
string|null
$title
= null
Methods
__toString()
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|null $alternativeMarkupIdentifier = null ]) : string
Parameters
- $alternativeMarkupIdentifier : string|null = 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
IconStategetTitle()
public
getTitle() : string|null
Return values
string|nullisSpinning()
public
isSpinning() : bool
Return values
boolrender()
public
render([string|null $alternativeMarkupIdentifier = null ]) : string
Parameters
- $alternativeMarkupIdentifier : string|null = null
Return values
stringsetAlternativeMarkup()
public
setAlternativeMarkup(string $markupIdentifier, string $markup) : $this
Parameters
- $markupIdentifier : string
- $markup : string
Return values
$thissetIdentifier()
public
setIdentifier(string $identifier) : $this
Parameters
- $identifier : string
Return values
$thissetMarkup()
public
setMarkup(string $markup) : $this
Parameters
- $markup : string
Return values
$thissetOverlayIcon()
public
setOverlayIcon(Icon|null $overlayIcon) : $this
Parameters
- $overlayIcon : Icon|null
Return values
$thissetSize()
Sets the size and creates the new dimension
public
setSize(string|IconSize $size) : self
Parameters
- $size : string|IconSize
Tags
Return values
selfsetSpinning()
public
setSpinning(bool $spinning) : $this
Parameters
- $spinning : bool
Return values
$thissetState()
public
setState(IconState $state) : $this
Parameters
- $state : IconState
Return values
$thissetTitle()
public
setTitle(string|null $title) : $this
Parameters
- $title : string|null
Return values
$thiswrappedIcon()
Wrap icon markup in unified HTML code
protected
wrappedIcon([string|null $alternativeMarkupIdentifier = null ]) : string
Parameters
- $alternativeMarkupIdentifier : string|null = null