Stay organized with collections
Save and categorize content based on your preferences.
blockly > ComponentManager
ComponentManager class
Manager for all items registered with the workspace.
Signature:
export declare class ComponentManager
Properties
Property |
Modifiers |
Type |
Description |
Capability |
static |
typeof Capability |
|
Methods
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eComponentManager\u003c/code\u003e class in Blockly manages all registered workspace items, including their capabilities and properties.\u003c/p\u003e\n"],["\u003cp\u003eYou can add, remove, and retrieve components and their associated capabilities using the provided methods.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eComponentManager\u003c/code\u003e provides methods to check for specific component capabilities and retrieve components based on them.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [ComponentManager](./blockly.componentmanager_class.md)\n\nComponentManager class\n----------------------\n\nManager for all items registered with the workspace.\n\n**Signature:** \n\n export declare class ComponentManager \n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-----------------------------------------------------------------------|-----------|-------------------|-------------|\n| [Capability](./blockly.componentmanager_class.capability_property.md) | `static` | typeof Capability | |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|--------------------------------------------------------------------------------------------------------------|-----------|--------------------------------------------------------------------------|\n| [addCapability(id, capability)](./blockly.componentmanager_class.addcapability_1_method.md) | | Adds a capability to a existing registered component. |\n| [addComponent(componentInfo, opt_allowOverrides)](./blockly.componentmanager_class.addcomponent_1_method.md) | | Adds a component. |\n| [getComponent(id)](./blockly.componentmanager_class.getcomponent_1_method.md) | | Gets the component with the given ID. |\n| [getComponents(capability, sorted)](./blockly.componentmanager_class.getcomponents_1_method.md) | | Gets all the components with the specified capability. |\n| [hasCapability(id, capability)](./blockly.componentmanager_class.hascapability_1_method.md) | | Returns whether the component with this id has the specified capability. |\n| [removeCapability(id, capability)](./blockly.componentmanager_class.removecapability_1_method.md) | | Removes a capability from an existing registered component. |\n| [removeComponent(id)](./blockly.componentmanager_class.removecomponent_1_method.md) | | Removes a component. |"]]