Class DynamicBlockFactory
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Factory to create DynamicBlocks which makes it possible to add a block property to a content instance that is not part of the ContentType.
Inheritance
Inherited Members
Namespace: EPiServer.Construction.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
[ServiceConfiguration]
public class DynamicBlockFactory
Constructors
DynamicBlockFactory(IPropertyDataFactory, IContentTypeRepository, IPropertyDefinitionTypeRepository, IContentDataBuilder, IContentDataFactory<BlockData>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DynamicBlockFactory class.
Declaration
public DynamicBlockFactory(IPropertyDataFactory propertyDataFactory, IContentTypeRepository contentTypeRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IContentDataBuilder contentDataBuilder, IContentDataFactory<BlockData> blockDataFactory)
Parameters
Type | Name | Description |
---|---|---|
IPropertyDataFactory | propertyDataFactory | The property data factory. |
IContentTypeRepository | contentTypeRepository | The block type repository. |
IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | The property definition type repository. |
IContentDataBuilder | contentDataBuilder | The content data builder. |
IContentDataFactory<BlockData> | blockDataFactory | The block data factory. |
Methods
CreateDynamicBlock(BlockPropertyDefinitionType, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Creates a dynamic block using a specific definition.
Declaration
public virtual IPropertyBlock CreateDynamicBlock(BlockPropertyDefinitionType blockPropertyDefinitionType, string dynamicBlockName)
Parameters
Type | Name | Description |
---|---|---|
BlockPropertyDefinitionType | blockPropertyDefinitionType | Type of the block property definition. |
System.String | dynamicBlockName | Name of the dynamic block. |
Returns
Type | Description |
---|---|
IPropertyBlock | The dynamic block created. |
Remarks
A dynamic block is a block property that is not defined on any PageType.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the |
CreateDynamicBlock<T>(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Creates a typed dynamic block.
Declaration
public virtual IPropertyBlock<T> CreateDynamicBlock<T>(string dynamicBlockName)
where T : BlockData
Parameters
Type | Name | Description |
---|---|---|
System.String | dynamicBlockName | Name of the dynamic block. |
Returns
Type | Description |
---|---|
IPropertyBlock<T> | The dynamic block created. |
Type Parameters
Name | Description |
---|---|
T | Type inheriting BlockData. |
Remarks
A dynamic block is a block property that is not defined on any PageType.
The dynamicBlockName
cannot contain either '.', ':' or 'D:'.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the |