Attribute Class
src/ui/react/src/oop/attribute.js:4
Attribute implementation.
Constructor
Attribute
()
Index
Methods
Methods
_callStringOrFunction
-
stringOrFunction -
args
Calls the provided param as function with the supplied arguments. If param provided as string, a corresponding function in this object will be called. If provided param is a function, it will be directly called.
Parameters:
-
stringOrFunctionString | FunctionThe function which should be called
-
argsAny | ArrayThe arguments which will be provided to the called function
Returns:
The returned value from the called function
_init
-
attr
Initializes an attribute. Sets its default value depending on the flags of the attribute and the passed configuration object to the constructor.
Parameters:
-
attrStringThe name of the attribute which have to be initialized.
_isInitialized
-
attr
Checks if an attribute is initialized. An attribute is considered as initialized when there is an own property with this name in the local collection of attribute values for the current instance.
Parameters:
-
attrStringThe attribute which should be checked if it is initialized.
Returns:
Returns true if the attribute has been initialized, false otherwise.
get
-
attr
Retrieves the value of an attribute.
Parameters:
-
attrStringThe attribute which value should be retrieved.
Returns:
The value of the attribute.
set
-
attr -
value
Sets the value of an attribute.
Parameters:
-
attrStringThe attribute which value should be set.
-
valueAnyThe value which should be set to the attribute.