Class $k.InstanceType
Represents a type of instances
- Defined in: InstanceType.js
- Extends: $k.Type
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Class Detail
$k.InstanceType()
Method Detail
-
Returns all instances of this type and all subtypes. Avoid using this function if possible, use queries instead
- Returns:
- {$k.Instance[]}
-
Create a new instance of this type
- Parameters:
- {string} param Optional
- The name of the new instance
- {string} language Optional
- Language of the value. If not defined, the current language will be used. Ignored if the attribute is not translated
- Throws:
- {$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:
- {$k.Instance} The created instance
-
Create a new subtype
- Parameters:
- {string} param Optional
- The name of the new type
- {string} language Optional
- Language of the value. If not defined, the current language will be used. Ignored if the attribute is not translated
- Throws:
- {$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:
- {$k.Type} The created type
-
Returns the types that can be extended by this type or a subtype. Does not check if this type allows to create extensions
- Returns:
- {$k.InstanceType[]}
- See:
- $k.Type#canCreateExtensions
-
Returns the types that can extend instances of this type. Does not check if these types allow to create extensions
- Returns:
- {$k.InstanceType[]}
- See:
- $k.Type#canCreateExtensions
-
Returns all direct instances of this type. Avoid using this function if possible, use queries instead
- Returns:
- {$k.Instance[]}