void
configureAttribute
(
key
,
map
,
init
)
Sets or updates an Attribute instance's properties.
- Parameters:
-
key <String>
The attribute's name.
-
map <Object>
A key-value map of attribute properties
-
init <Boolean>
Whether or not this should become the intial config.
- Returns:
void
void
fireBeforeChangeEvent
(
key
,
e
)
Fires the attribute's beforeChange event.
- Parameters:
-
key <String>
The attribute's name.
-
e <Obj>
The event object to pass to handlers.
- Returns:
void
void
fireChangeEvent
(
key
,
e
)
Fires the attribute's change event.
- Parameters:
-
key <String>
The attribute's name.
-
e <Obj>
The event object to pass to the handlers.
- Returns:
void
void
get
(
key
)
Returns the current value of the attribute.
- Parameters:
-
key <String>
The attribute whose value will be returned.
- Returns:
void
private
object
getAttributeConfig
(
key
)
Returns the attribute's properties.
- Parameters:
-
key <String>
The attribute's name
- Returns:
object
- A key-value map containing all of the
attribute's properties.
Array
getAttributeKeys
(
)
Returns an array of attribute names.
- Returns:
Array
- An array of attribute names.
void
refresh
(
key
,
silent
)
Sets the attribute's value to its current value.
- Parameters:
-
key <String | Array>
The attribute(s) to refresh
-
silent <Boolean>
Whether or not to suppress change events
- Returns:
void
void
register
(
key
,
map
)
Adds an Attribute to the AttributeProvider instance.
- Parameters:
-
key <String>
The attribute's name
-
map <Object>
A key-value map containing the
attribute's properties.
- Returns:
void
Deprecated Use setAttributeConfig
private
void
resetAttributeConfig
(
key
)
Resets an attribute to its intial configuration.
- Parameters:
-
key <String>
The attribute's name.
- Returns:
void
Boolean
resetValue
(
key
,
silent
)
Resets the specified attribute's value to its initial value.
- Parameters:
-
key <String>
The name of the attribute
-
silent <Boolean>
Whether or not to suppress change events
- Returns:
Boolean
- Whether or not the value was set
Boolean
set
(
key
,
value
,
silent
)
Sets the value of a config.
- Parameters:
-
key <String>
The name of the attribute
-
value <Any>
The value to apply to the attribute
-
silent <Boolean>
Whether or not to suppress change events
- Returns:
Boolean
- Whether or not the value was set.
void
setAttributeConfig
(
key
,
map
,
init
)
Sets or updates an Attribute instance's properties.
- Parameters:
-
key <String>
The attribute's name.
-
map <Object>
A key-value map of attribute properties
-
init <Boolean>
Whether or not this should become the intial config.
- Returns:
void
void
setAttributes
(
map
,
silent
)
Sets multiple attribute values.
- Parameters:
-
map <Object>
A key-value map of attributes
-
silent <Boolean>
Whether or not to suppress change events
- Returns:
void