Show: Inherited Protected Private Deprecated

# Attribute Class

Defined in: `src/ui/react/src/oop/attribute.js:4`

Attribute implementation.

## Constructor

### `Attribute`

()

Defined in `src/ui/react/src/oop/attribute.js:4`

## Index

### Methods

- _callStringOrFunction
- _init
- _isInitialized
- get
- set

## Methods

### `_callStringOrFunction`

(

- `stringOrFunction`
- `args`

)
Any protected

Defined in `src/ui/react/src/oop/attribute.js:82`

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:

- `stringOrFunction` String | Function

  The function which should be called

- `args` Any | Array

  The arguments which will be provided to the called function

#### Returns:

Any:

The returned value from the called function

### `_init`

(

- `attr`

)
protected

Defined in `src/ui/react/src/oop/attribute.js:109`

Initializes an attribute. Sets its default value depending on the flags of the attribute and the passed configuration object to the constructor.

#### Parameters:

- `attr` String

  The name of the attribute which have to be initialized.

### `_isInitialized`

(

- `attr`

)
Boolean protected

Defined in `src/ui/react/src/oop/attribute.js:177`

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:

- `attr` String

  The attribute which should be checked if it is initialized.

#### Returns:

Boolean:

Returns true if the attribute has been initialized, false otherwise.

### `get`

(

- `attr`

)
Any

Defined in `src/ui/react/src/oop/attribute.js:18`

Retrieves the value of an attribute.

#### Parameters:

- `attr` String

  The attribute which value should be retrieved.

#### Returns:

Any:

The value of the attribute.

### `set`

(

- `attr`
- `value`

)

Defined in `src/ui/react/src/oop/attribute.js:45`

Sets the value of an attribute.

#### Parameters:

- `attr` String

  The attribute which value should be set.

- `value` Any

  The value which should be set to the attribute.