OOjsUI Object-Oriented JavaScript – User Interface

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
OOUI\IconElement Class Reference

Element containing an icon. More...

Inheritance diagram for OOUI\IconElement:
[legend]
Collaboration diagram for OOUI\IconElement:
[legend]

## Public Member Functions
| __construct (Element $element, array $config=array())
| setIcon ($icon=null)
| Set icon name. More...
| getIcon ()
| Get icon name. More...
| getConfig (&$config)
Public Member Functions inherited from OOUI\ElementMixin
| __construct (Element $element, Tag $target, array $config=array())
| Create element. More...
| getConfig (&$config)
| Add properties to the given `$config` array to allow reconstruction of this widget via its constructor. More...

## Static Public Attributes
static | $targetPropertyName = 'icon'
Static Public Attributes inherited from OOUI\ElementMixin
static string | $targetPropertyName = ''
| Property name for accessing the target on the element.

## Protected Attributes
string | $icon = null
| Symbolic icon name.
Protected Attributes inherited from OOUI\ElementMixin
Element | $element = null
| Element being mixed into.

## Additional Inherited Members
Public Attributes inherited from OOUI\ElementMixin
Tag | $target = null
| Tag being targeted.

## Detailed Description

Element containing an icon.

Icons are graphics, about the size of normal text. They can be used to aid the user in locating a control or convey information in a more space efficient way. Icons should rarely be used without labels; such as in a toolbar where space is at a premium or within a context where the meaning is very clear to the user.

## Constructor & Destructor Documentation

OOUI\IconElement::__construct | ( | Element | $element,
|  | array | $config = `array()`
| ) |  |

Parameters

  Element | $element | Element being mixed into
  array | $config | Configuration options
  string | $config,['icon'] | Symbolic icon name

## Member Function Documentation

OOUI\IconElement::getIcon | ( |  | ) |

Get icon name.

Returns
  string Icon name

OOUI\IconElement::setIcon | ( |  | $icon = `null` | ) |

Set icon name.

Parameters

  string | null | $icon | Symbolic icon name

The documentation for this class was generated from the following file:

- php/mixins/IconElement.php