‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Imaging\Icon Class Reference

Public Member Functions

 getMarkup (?string $alternativeMarkupIdentifier=null)
 
$this setMarkup (string $markup)
 
 getAlternativeMarkup (string $markupIdentifier)
 
$this setAlternativeMarkup (string $markupIdentifier, string $markup)
 
 getIdentifier ()
 
$this setIdentifier (string $identifier)
 
 getTitle ()
 
$this setTitle (?string $title)
 
 getOverlayIcon ()
 
$this setOverlayIcon (?Icon $overlayIcon)
 
 getSize ()
 
 setSize (string|IconSize $size)
 
 isSpinning ()
 
$this setSpinning (bool $spinning)
 
 getState ()
 
$this setState (IconState $state)
 
 getDimension ()
 
 render (?string $alternativeMarkupIdentifier=null)
 
 __toString ()
 

Public Attributes

const SIZE_DEFAULT = 'default'
 
const SIZE_SMALL = 'small'
 
const SIZE_MEDIUM = 'medium'
 
const SIZE_LARGE = 'large'
 
const SIZE_MEGA = 'mega'
 
const SIZE_OVERLAY = 'overlay'
 

Protected Member Functions

 wrappedIcon (?string $alternativeMarkupIdentifier=null)
 

Protected Attributes

string $identifier
 
string $title = null
 
Icon $overlayIcon = null
 
IconSize $size
 
bool $spinning = false
 
IconState null $state
 
Dimension $dimension
 
string $markup
 
array $alternativeMarkups = array( )
 

Detailed Description

Icon object, holds all information for one icon, identified by the "identifier" property. Is available to render itself as string.

Definition at line 26 of file Icon.php.

Member Function Documentation

◆ __toString()

TYPO3\CMS\Core\Imaging\Icon::__toString ( )

Definition at line 246 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\render().

◆ getAlternativeMarkup()

TYPO3\CMS\Core\Imaging\Icon::getAlternativeMarkup ( string  $markupIdentifier)

Definition at line 127 of file Icon.php.

◆ getDimension()

◆ getIdentifier()

◆ getMarkup()

TYPO3\CMS\Core\Imaging\Icon::getMarkup ( ?string  $alternativeMarkupIdentifier = null)

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

Definition at line 110 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$markup.

Referenced by TYPO3\CMS\Core\Imaging\Icon\wrappedIcon().

◆ getOverlayIcon()

TYPO3\CMS\Core\Imaging\Icon::getOverlayIcon ( )

◆ getSize()

TYPO3\CMS\Core\Imaging\Icon::getSize ( )

Definition at line 183 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\wrappedIcon().

◆ getState()

TYPO3\CMS\Core\Imaging\Icon::getState ( )

Definition at line 218 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$state.

◆ getTitle()

TYPO3\CMS\Core\Imaging\Icon::getTitle ( )

Definition at line 155 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$title.

Referenced by TYPO3\CMS\Core\Imaging\Icon\wrappedIcon().

◆ isSpinning()

TYPO3\CMS\Core\Imaging\Icon::isSpinning ( )

Definition at line 204 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$spinning.

Referenced by TYPO3\CMS\Core\Imaging\Icon\wrappedIcon().

◆ render()

TYPO3\CMS\Core\Imaging\Icon::render ( ?string  $alternativeMarkupIdentifier = null)

◆ setAlternativeMarkup()

$this TYPO3\CMS\Core\Imaging\Icon::setAlternativeMarkup ( string  $markupIdentifier,
string  $markup 
)

◆ setIdentifier()

$this TYPO3\CMS\Core\Imaging\Icon::setIdentifier ( string  $identifier)
Returns
‪$this

Definition at line 149 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$identifier.

◆ setMarkup()

$this TYPO3\CMS\Core\Imaging\Icon::setMarkup ( string  $markup)

◆ setOverlayIcon()

$this TYPO3\CMS\Core\Imaging\Icon::setOverlayIcon ( ?Icon  $overlayIcon)
Returns
‪$this

Definition at line 177 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$overlayIcon.

◆ setSize()

◆ setSpinning()

$this TYPO3\CMS\Core\Imaging\Icon::setSpinning ( bool  $spinning)
Returns
‪$this

Definition at line 212 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$spinning.

◆ setState()

$this TYPO3\CMS\Core\Imaging\Icon::setState ( IconState  $state)
Returns
‪$this

Definition at line 226 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$state.

◆ setTitle()

$this TYPO3\CMS\Core\Imaging\Icon::setTitle ( ?string  $title)
Returns
‪$this

Definition at line 163 of file Icon.php.

References TYPO3\CMS\Core\Imaging\Icon\$title.

◆ wrappedIcon()

TYPO3\CMS\Core\Imaging\Icon::wrappedIcon ( ?string  $alternativeMarkupIdentifier = null)
protected

Member Data Documentation

◆ $alternativeMarkups

array TYPO3\CMS\Core\Imaging\Icon::$alternativeMarkups = array( )
protected

Definition at line 105 of file Icon.php.

◆ $dimension

Dimension TYPO3\CMS\Core\Imaging\Icon::$dimension
protected

Definition at line 97 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\getDimension().

◆ $identifier

string TYPO3\CMS\Core\Imaging\Icon::$identifier
protected

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

Definition at line 67 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\getIdentifier(), and TYPO3\CMS\Core\Imaging\Icon\setIdentifier().

◆ $markup

◆ $overlayIcon

Icon TYPO3\CMS\Core\Imaging\Icon::$overlayIcon = null
protected

The identifier for a possible overlay icon

Definition at line 77 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\getOverlayIcon(), and TYPO3\CMS\Core\Imaging\Icon\setOverlayIcon().

◆ $size

IconSize TYPO3\CMS\Core\Imaging\Icon::$size
protected

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

Definition at line 82 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\setSize().

◆ $spinning

bool TYPO3\CMS\Core\Imaging\Icon::$spinning = false
protected

Flag to indicate if the icon has a spinning animation

Definition at line 87 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\isSpinning(), and TYPO3\CMS\Core\Imaging\Icon\setSpinning().

◆ $state

IconState null TYPO3\CMS\Core\Imaging\Icon::$state
protected

Contains the state information

Definition at line 93 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\getState(), and TYPO3\CMS\Core\Imaging\Icon\setState().

◆ $title

string TYPO3\CMS\Core\Imaging\Icon::$title = null
protected

The title rendered to the icon

Definition at line 72 of file Icon.php.

Referenced by TYPO3\CMS\Core\Imaging\Icon\getTitle(), and TYPO3\CMS\Core\Imaging\Icon\setTitle().

◆ SIZE_DEFAULT

const TYPO3\CMS\Core\Imaging\Icon::SIZE_DEFAULT = 'default'

◆ SIZE_LARGE

const TYPO3\CMS\Core\Imaging\Icon::SIZE_LARGE = 'large'

◆ SIZE_MEDIUM

const TYPO3\CMS\Core\Imaging\Icon::SIZE_MEDIUM = 'medium'

◆ SIZE_MEGA

const TYPO3\CMS\Core\Imaging\Icon::SIZE_MEGA = 'mega'

◆ SIZE_OVERLAY

const TYPO3\CMS\Core\Imaging\Icon::SIZE_OVERLAY = 'overlay'

◆ SIZE_SMALL

const TYPO3\CMS\Core\Imaging\Icon::SIZE_SMALL = 'small'

Definition at line 38 of file Icon.php.