Class PublishedContentTypeFactory
Provides a default implementation for IPublished
Inheritance
Namespace: Umbraco.Cms.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
public class PublishedContentTypeFactory : IPublishedContentTypeFactory
Constructors
View SourcePublishedContentTypeFactory(IPublishedModelFactory, PropertyValueConverterCollection, IDataTypeService)
Declaration
public PublishedContentTypeFactory(IPublishedModelFactory publishedModelFactory, PropertyValueConverterCollection propertyValueConverters, IDataTypeService dataTypeService)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
publishedModelFactory | |
Property |
propertyValueConverters | |
IData |
dataTypeService |
Methods
View SourceCreateContentType(IContentTypeComposition)
Creates a published content type.
Declaration
public IPublishedContentType CreateContentType(IContentTypeComposition contentType)
Parameters
Type | Name | Description |
---|---|---|
IContent |
contentType | An content type. |
Returns
Type | Description |
---|---|
IPublished |
A published content type corresponding to the item type and content type. |
CreateCorePropertyType(IPublishedContentType, String, Int32, ContentVariation)
Creates a core (non-user) published property type.
Declaration
public IPublishedPropertyType CreateCorePropertyType(IPublishedContentType contentType, string propertyTypeAlias, int dataTypeId, ContentVariation variations = ContentVariation.Nothing)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
contentType | The published content type owning the property. |
System. |
propertyTypeAlias | The property type alias. |
System. |
dataTypeId | The datatype identifier. |
Content |
variations | The variations. |
Returns
Type | Description |
---|---|
IPublished |
Remarks
Is used by Published
CreatePropertyType(IPublishedContentType, String, Int32, ContentVariation)
Creates a published property type.
Declaration
public IPublishedPropertyType CreatePropertyType(IPublishedContentType contentType, string propertyTypeAlias, int dataTypeId, ContentVariation variations = ContentVariation.Nothing)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
contentType | The published content type owning the property. |
System. |
propertyTypeAlias | The property type alias. |
System. |
dataTypeId | The datatype identifier. |
Content |
variations | The variations. |
Returns
Type | Description |
---|---|
IPublished |
Remarks
Is used by Published
CreatePropertyType(IPublishedContentType, IPropertyType)
Creates a published property type.
Declaration
public IPublishedPropertyType CreatePropertyType(IPublishedContentType contentType, IPropertyType propertyType)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
contentType | The published content type owning the property. |
IProperty |
propertyType | A property type. |
Returns
Type | Description |
---|---|
IPublished |
Remarks
Is used by Published
GetDataType(Int32)
Gets a published datatype.
Declaration
public PublishedDataType GetDataType(int id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id |
Returns
Type | Description |
---|---|
Published |
NotifyDataTypeChanges(Int32[])
Notifies the factory of datatype changes.
Declaration
public void NotifyDataTypeChanges(params int[] ids)
Parameters
Type | Name | Description |
---|---|---|
System. |
ids |
Remarks
This is so the factory can flush its caches.
Invoked by the IPublishedSnapshotService.