blockly > ComponentManager > getComponents
ComponentManager.getComponents() method
Gets all the components with the specified capability.
Signature:
getComponents<T extends IComponent>(capability: string | Capability<T>, sorted: boolean): T[];
Parameters
Parameter | Type | Description |
---|---|---|
capability | string | Capability<T> | The capability of the component. |
sorted | boolean | Whether to return list ordered by weights. |
Returns:
T[]
The components that match the specified capability.