new $k.InstanceType()
Represents a type of instances
Extends
Methods
allInstances() : Array.<$k.Instance>
Returns all instances of this type and all subtypes.
Avoid using this function if possible, use queries instead
Returns:
| Type | Description | 
|---|---|
| Array.<$k.Instance> | 
createInstance(param, language, options) : $k.Instance
Create a new instance of this type
| Name | Type | Description | 
|---|---|---|
param | 
            
            
            string | 
                
                    
                        optional
                    
                    
                        
                    
                
                 The name of the new instance  | 
        
language | 
            
            
            string | 
                
                    
                        optional
                    
                    
                        
                    
                
                 Language of the value. Either ISO 639-1 (2-letter code, e.g. "en") or ISO 639-2B (3-letter code, e.g. "eng"). If not defined, the current language will be used.  | 
        
options | 
            
            
            object | 
                
                    
                        optional
                    
                    
                        
                    
                
                 Options 
  | 
        
Throws:
| Type | Description | 
|---|---|
| $k.exception.SchemaError | If the type is abstract  | 
            
| $k.exception.AccessDenied | If creating an instance is not allowed  | 
            
| $k.exception.TransactionError | If no write transaction is active  | 
            
Returns:
| Type | Description | 
|---|---|
| $k.Instance | The created instance | 
createSubtype(param, language) : $k.Type
Create a new subtype
| Name | Type | Description | 
|---|---|---|
param | 
            
            
            string | 
                
                    
                        optional
                    
                    
                        
                    
                
                 The name of the new type  | 
        
language | 
            
            
            string | 
                
                    
                        optional
                    
                    
                        
                    
                
                 Language of the value. Either ISO 639-1 (2-letter code, e.g. "en") or ISO 639-2B (3-letter code, e.g. "eng"). If not defined, the current language will be used.  | 
        
Throws:
| Type | Description | 
|---|---|
| $k.exception.SchemaError | If subtypes cannot be created  | 
            
| $k.exception.AccessDenied | If creating a subtype is not allowed  | 
            
| $k.exception.TransactionError | If no write transaction is active  | 
            
Returns:
| Type | Description | 
|---|---|
| $k.Type | The created type | 
extendedTypes() : Array.<$k.InstanceType>
Returns the types that can be extended by this type or a subtype.
Does not check if this type allows to create extensions
Returns:
| Type | Description | 
|---|---|
| Array.<$k.InstanceType> | 
extensionTypes() : Array.<$k.InstanceType>
Returns the types that can extend instances of this type.
Does not check if these types allow to create extensions
Returns:
| Type | Description | 
|---|---|
| Array.<$k.InstanceType> | 
instances() : Array.<$k.Instance>
Returns all direct instances of this type.
Avoid using this function if possible, use queries instead
Returns:
| Type | Description | 
|---|---|
| Array.<$k.Instance> |