Constructor
new $k.Folder(optionsopt)
Constructs a new folder
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Options object Properties
|
- Since
- 6.1.1
Extends
Methods
addElement(folderElement)
Add the folder element to this folder
| Name | Type | Description |
|---|---|---|
folderElement | $k. | The element to be added |
- Since
- 6.1.0
jsDocNoAdminRights
If the folder element cannot be stored in the folder
addFolderElement(folderElement)
Add the folder element to this folder
| Name | Type | Description |
|---|---|---|
folderElement | $k. | The folder element to be added |
- Deprecated
- Use addElement()
createSemanticCollection(name) → {$k.SemanticCollection}
Creates a semantic collection and adds it to this folder
| Name | Type | Description |
|---|---|---|
name | string | The name of the new semantic collection |
- Since
- 5.3.3
- Deprecated
- Use
new $k.SemanticCollection()to build a collection, and add it to the folder withaddFolderElement()
- Use
- See
- addFolderElement
- $k.SemanticCollection
If no write transaction is active
the new semantic collection
- Type:
- $k.
SemanticCollection
deregister()
Deregisters the element. The ID will be undefined afterwards. Equivalent to setId(undefined)
- Inherited From
- See
- setId
jsDocNoAdminRights
elements() → {Array.<($k.FolderElement|$k.SemanticElement)>}
Returns the elements of the collection
- Inherited From
- Type:
- Array.<($k.FolderElement|$k.SemanticElement)>
id() → {string|undefined}
Returns the registered ID, or undefined if not registered.
- Inherited From
- Type:
- string |
undefined
leafElements() → {Array.<($k.FolderElement|$k.SemanticElement)>}
Returns the elements which are not folders
- Type:
- Array.<($k.FolderElement|$k.SemanticElement)>
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
removeElement(folderElement)
Remove the folder element from this folder
| Name | Type | Description |
|---|---|---|
folderElement | $k. | The element to be removed |
- Since
- 6.1.1
If the element was not contained in the folder
removeFolderElement(folderElement)
Remove the folder element from this folder
| Name | Type | Description |
|---|---|---|
folderElement | $k. | The folder element to be removed |
- Since
- 6.1.0
- Deprecated
- Use removeElement()
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
subfolders() → {Array.<$k.Folder>}
Returns the subfolders
- Type:
- Array.<$k.Folder>