Icon

class \TYPO3\CMS\Core\Imaging\Icon

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

Is available to render itself as string.

Table of Contents

Properties

$alternativeMarkups  : array
$bidi  : bool
Flag to indicate if the icon should be mirrored in RTL mode
$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
isBidi()  : bool
isSpinning()  : bool
render()  : string
setAlternativeMarkup()  : $this
setBidi()  : $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

Properties

$alternativeMarkups

protected array $alternativeMarkups = []

$bidi

Flag to indicate if the icon should be mirrored in RTL mode

protected bool $bidi = false

$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 = 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

$title

The title rendered to the icon

protected string|null $title = null

Methods

__toString()

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|null $alternativeMarkupIdentifier = null ]) : string

Parameters

$alternativeMarkupIdentifier : string|null = null

Return values

string

getSize()

public getSize() : string

Return values

string

getTitle()

public getTitle() : string|null

Return values

string|null

isBidi()

public isBidi() : bool

Return values

bool

isSpinning()

public isSpinning() : bool

Return values

bool

render()

public render([string|null $alternativeMarkupIdentifier = null ]) : string

Parameters

$alternativeMarkupIdentifier : string|null = null

Return values

string

setAlternativeMarkup()

public setAlternativeMarkup(string $markupIdentifier, string $markup) : $this

Parameters

$markupIdentifier : string
$markup : string

Return values

$this

setBidi()

public setBidi(bool $bidi) : $this

Parameters

$bidi : bool

Return values

$this

setIdentifier()

public setIdentifier(string $identifier) : $this

Parameters

$identifier : string

Return values

$this

setMarkup()

public setMarkup(string $markup) : $this

Parameters

$markup : string

Return values

$this

setOverlayIcon()

public setOverlayIcon(Icon|null $overlayIcon) : $this

Parameters

$overlayIcon : Icon|null

Return values

$this

setSize()

Sets the size and creates the new dimension

public setSize(IconSize $size) : self

Parameters

$size : IconSize

Return values

self

setSpinning()

public setSpinning(bool $spinning) : $this

Parameters

$spinning : bool

Return values

$this

setTitle()

public setTitle(string|null $title) : $this

Parameters

$title : string|null

Return values

$this

wrappedIcon()

Wrap icon markup in unified HTML code

protected wrappedIcon([string|null $alternativeMarkupIdentifier = null ]) : string

Parameters

$alternativeMarkupIdentifier : string|null = null

Return values

string
On this page