class IconObject extends AbstractContent implements Icon

The IconObject class

Properties

protected $icon

Methods

string
__toString()

Returns the component as HTML markup string

$this
printHtml()

Prints the component as HTML markup string

__construct(string $iconName)

No description

I
createTag()

No description

string
getHtml()

Returns the component as HTML markup string

$this
setTitle(string|null $title = null)

Sets the title of the icon

$this
setDecorative(bool $decorative)

Set whether the icon is for decoration only

Details

in AbstractContent at line 27
string __toString()

Returns the component as HTML markup string

Return Value

string

HTML markup of the object

in AbstractContent at line 36
$this printHtml()

Prints the component as HTML markup string

Return Value

$this

for a fluent interface

at line 30
__construct(string $iconName)

No description

Parameters

string $iconName

at line 35
I createTag()

No description

Return Value

I

at line 39
string getHtml()

Returns the component as HTML markup string

Return Value

string

HTML markup of the component

Exceptions

HtmlException

if HTML parsing fails

at line 49
$this setTitle(string|null $title = null)

Sets the title of the icon

Parameters

string|null $title

the ARIA label text for the icon

Return Value

$this

for a fluent interface

at line 63
$this setDecorative(bool $decorative)

Set whether the icon is for decoration only

Parameters

bool $decorative

Return Value

$this

for a fluent interface