OOjsUI
Object-Oriented JavaScript – User Interface
|
Element with named flags that can be added, removed, listed and checked. More...
Public Member Functions | |
__construct (Element $element, array $config=array()) | |
hasFlag ($flag) | |
Check if a flag is set. More... | |
getFlags () | |
Get the names of all flags set. More... | |
clearFlags () | |
Clear all flags. More... | |
setFlags ($flags) | |
Add one or more flags. More... | |
getConfig (&$config) | |
![]() | |
__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 = 'flagged' |
![]() | |
static string | $targetPropertyName = '' |
Property name for accessing the target on the element. | |
Protected Attributes | |
string[] | $flags = array() |
Flags. | |
![]() | |
Element | $element = null |
Element being mixed into. | |
Additional Inherited Members | |
![]() | |
Tag | $target = null |
Tag being targeted. | |
Element with named flags that can be added, removed, listed and checked.
A flag, when set, adds a CSS class on the $element
by combining oo-ui-flaggedElement-
with the flag name. Flags are primarily useful for styling.
OOUI\FlaggedElement::__construct | ( | Element | $element, |
array | $config = array() |
||
) |
OOUI\FlaggedElement::clearFlags | ( | ) |
Clear all flags.
OOUI\FlaggedElement::getFlags | ( | ) |
Get the names of all flags set.
OOUI\FlaggedElement::hasFlag | ( | $flag | ) |
Check if a flag is set.
string | $flag | Name of flag |
OOUI\FlaggedElement::setFlags | ( | $flags | ) |
Add one or more flags.
string | array | $flags | One or more flags to add, or an array keyed by flag name containing boolean set/remove instructions. |