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

Element with a title. More...

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

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$elementElement being mixed into
array$configConfiguration 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$titleTitle text or null for no title
Returns
$this

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