OOjsUI
Object-Oriented JavaScript – User Interface
OOUI\IconElement Class Reference

Element containing an icon. More...

+ Inheritance diagram for OOUI\IconElement:
+ Collaboration diagram for OOUI\IconElement:

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$elementElement being mixed into
array$configConfiguration 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$iconSymbolic icon name
Returns
$this

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