OOUI
Object-Oriented User Interface
Loading...
Searching...
No Matches
OOUI\Theme Class Reference

Theme logic. More...

+ Inheritance diagram for OOUI\Theme:

Public Member Functions

 getElementClasses (Element $element)
 Get a list of classes to be applied to a widget.
 
 updateElementClasses (Element $element)
 Update CSS classes provided by the theme.
 

Static Public Member Functions

static setSingleton (Theme $theme=null)
 
static singleton ()
 

Detailed Description

Theme logic.

@abstract

Member Function Documentation

◆ getElementClasses()

OOUI\Theme::getElementClasses ( Element $element)

Get a list of classes to be applied to a widget.

The 'on' and 'off' lists combined MUST contain keys for all classes the theme adds or removes, otherwise state transitions will not work properly.

Parameters
Element$elementElement for which to get classes
Returns
string[][] Categorized class names with on and off lists

Reimplemented in OOUI\BlankTheme, and OOUI\WikimediaUITheme.

◆ setSingleton()

static OOUI\Theme::setSingleton ( Theme $theme = null)
static
Parameters
Theme | null$themeTheme to use throughout the application

◆ singleton()

static OOUI\Theme::singleton ( )
static
Returns
Theme

◆ updateElementClasses()

OOUI\Theme::updateElementClasses ( Element $element)

Update CSS classes provided by the theme.

For elements with theme logic hooks, this should be called any time there's a state change.

Parameters
Element$elementElement for which to update classes

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