OOUI\LabelElement Class Reference

Element containing a label. More...

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

## Public Member Functions

| __construct (Element $element, array $config=array())
| setLabel ($label)
| Set the label. More...
| getLabel ()
| Get the label. 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 = 'label'
Static Public Attributes inherited from OOUI\ElementMixin
static string | $targetPropertyName = ''
| Property name for accessing the target on the element.

## Protected Attributes

string HtmlSnippet null | $label = null
| Label value.
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 a label.

## Constructor & Destructor Documentation

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

Parameters

  Element | $element | Element being mixed into
  array | $config | Configuration options
  string | HtmlSnippet | $config,['label'] | Label text

## Member Function Documentation

OOUI\LabelElement::getLabel | ( |  | ) |

Get the label.

Returns
  string|HtmlSnippet|null Label text

OOUI\LabelElement::setLabel | ( |  | $label | ) |

Set the label.

An empty string will result in the label being hidden. A string containing only whitespace will be converted to a single `` .

Parameters

  string | HtmlSnippet | null | $label | Label text

Returns
  $this

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

- php/mixins/LabelElement.php