states

Drupal. states

Source:
The base States namespace. Having the local states variable allows us to use the States namespace without having to always declare "Drupal.states".

Classes

Dependent
State
Trigger

Methods

(inner) compare(a, b) → {boolean}

Source:
Compares two values while ignoring undefined values.
Parameters:
Name Type Description
a * Value a.
b * Value b.
Returns:
The comparison result.
Type
boolean

(inner) invert(a, invertState) → {boolean}

Source:
Inverts a (if it's not undefined) when invertState is true.
Parameters:
Name Type Description
a * The value to maybe invert.
invertState boolean Whether to invert state or not.
Returns:
The result.
Type
boolean

(inner) ternary(a, b) → {boolean}

Source:
Bitwise AND with a third undefined state.
Parameters:
Name Type Description
a * Value a.
b * Value b
Returns:
The result.
Type
boolean