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\TitledElement Class Reference

Element with a title. More...

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

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

## Protected Attributes
string | $title = null
| Title text.
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 with a title.

Titles are rendered by the browser and are made visible when hovering the element. Titles are not visible on touch devices.

## Constructor & Destructor Documentation

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

Parameters

  Element | $element | Element being mixed into
  array | $config | Configuration options
  string | $config,['title'] | Title. If not provided, the static property 'title' is used.

## Member Function Documentation

OOUI\TitledElement::getTitle | ( |  | ) |

Get title.

Returns
  string Title string

OOUI\TitledElement::setTitle | ( |  | $title | ) |

Set title.

Parameters

  string | null | $title | Title text or null for no title

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

- php/mixins/TitledElement.php