Constructor
new $k.SemanticCollection()
Extends
Methods
addElement(semanticElement)
Adds the element to the collection.
| Name | Type | Description |
|---|---|---|
semanticElement | $k. | The element to add to the collection. |
- Since
- 5.3.3
jsDocNoAdminRights
If the argument is not a valid semantic element
deregister()
Deregisters the element. The ID will be undefined afterwards. Equivalent to setId(undefined)
- Inherited From
- See
- setId
jsDocNoAdminRights
elements() → {Array.<$k.SemanticElement>}
Returns the elements of the collection
- Overrides
- Type:
- Array.<$k.SemanticElement>
id() → {string|undefined}
Returns the registered ID, or undefined if not registered.
- Inherited From
- Type:
- string |
undefined
name() → {string}
Returns the name
- Inherited From
- Type:
- string
parentFolders() → {Array.<$k.Folder>}
Returns the folders that contain this element
- Inherited From
- Type:
- Array.<$k.Folder>
register(replaceScriptReferencesopt) → {string}
Registers the element with a private ID, if it has no registered ID yet.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
replaceScriptReferences | boolean | <optional> | false | True if ID references in scripts should be replaced. Only done when the old and the new ID is not undefined. |
- Since
- 6.1.1
- Inherited From
jsDocNoAdminRights
The registered ID
- Type:
- string
registryType() → {string}
Returns the name of the registry that contains elements of this type
- Inherited From
- Type:
- string
remove()
Deletes the element and removes it from all containing registries and folders
- Inherited From
jsDocNoAdminRights
If deleting the element is not possible, e.g. when trying to delete a system element
removeAll()
Removes all elements from the collection
- Since
- 5.3.3
jsDocNoAdminRights
removeElement(element)
Removes the element from the collection.
| Name | Type | Description |
|---|---|---|
element | $k. | The element to remove from the collection. |
- Since
- 5.3.3
jsDocNoAdminRights
setElements(elements)
Sets the elements of the collection. Overwrites the previous content.
| Name | Type | Description |
|---|---|---|
elements | Array.<$k.SemanticElement> | The element to add to the collection. |
- Since
- 6.1.1
jsDocNoAdminRights
If any of the elements is not a valid semantic element
setId(id, replaceScriptReferencesopt)
Registers the element with the given ID. If the element has already been registered, the current ID will be changed to the new ID.
Deprecated option: If the given ID is undefined or null, the element will be deregistered. Use deregister() instead
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | string | | The ID to set | ||
replaceScriptReferences | boolean | <optional> | false | True if ID references in scripts should be replaced. Only done when the old and the new ID is not undefined. |
- Inherited From
- See
- deregister
jsDocNoAdminRights
setName()
Sets the name of the element
- Since
- 6.1.1
- Inherited From
jsDocNoAdminRights