Class PublishedContentType
Represents an IPublished
Inheritance
Namespace: Umbraco.Cms.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
public class PublishedContentType : IPublishedContentType
Remarks
Instances of the Published
Constructors
View SourcePublishedContentType(Guid, Int32, String, PublishedItemType, IEnumerable<String>, Func<IPublishedContentType, IEnumerable<IPublishedPropertyType>>, ContentVariation, Boolean)
This constructor is for tests and is not intended to be used directly from application code.
Declaration
public PublishedContentType(Guid key, int id, string alias, PublishedItemType itemType, IEnumerable<string> compositionAliases, Func<IPublishedContentType, IEnumerable<IPublishedPropertyType>> propertyTypes, ContentVariation variations, bool isElement = false)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | |
System. |
id | |
System. |
alias | |
Published |
itemType | |
IEnumerable<System. |
compositionAliases | |
Func<IPublished |
propertyTypes | |
Content |
variations | |
System. |
isElement |
Remarks
Values are assumed to be consistent and are not checked.
PublishedContentType(Guid, Int32, String, PublishedItemType, IEnumerable<String>, IEnumerable<PublishedPropertyType>, ContentVariation, Boolean)
This constructor is for tests and is not intended to be used directly from application code.
Declaration
public PublishedContentType(Guid key, int id, string alias, PublishedItemType itemType, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes, ContentVariation variations, bool isElement = false)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | |
System. |
id | |
System. |
alias | |
Published |
itemType | |
IEnumerable<System. |
compositionAliases | |
IEnumerable<Published |
propertyTypes | |
Content |
variations | |
System. |
isElement |
Remarks
Values are assumed to be consistent and are not checked.
PublishedContentType(IContentTypeComposition, IPublishedContentTypeFactory)
Initializes a new instance of the Published
Declaration
public PublishedContentType(IContentTypeComposition contentType, IPublishedContentTypeFactory factory)
Parameters
Type | Name | Description |
---|---|---|
IContent |
contentType | |
IPublished |
factory |
Properties
View SourceAlias
Gets the content type alias.
Declaration
public string Alias { get; }
Property Value
Type | Description |
---|---|
System. |
CompositionAliases
Gets the aliases of the content types participating in the composition.
Declaration
public HashSet<string> CompositionAliases { get; }
Property Value
Type | Description |
---|---|
Hash |
Id
Gets the content type identifier.
Declaration
public int Id { get; }
Property Value
Type | Description |
---|---|
System. |
IsElement
Gets a value indicating whether this content type is for an element.
Declaration
public bool IsElement { get; }
Property Value
Type | Description |
---|---|
System. |
ItemType
Gets the content item type.
Declaration
public PublishedItemType ItemType { get; }
Property Value
Type | Description |
---|---|
Published |
Key
Gets the unique key for the content type.
Declaration
public Guid Key { get; }
Property Value
Type | Description |
---|---|
Guid |
PropertyTypes
Gets the content type properties.
Declaration
public IEnumerable<IPublishedPropertyType> PropertyTypes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IPublished |
Variations
Gets the content variations of the content type.
Declaration
public ContentVariation Variations { get; }
Property Value
Type | Description |
---|---|
Content |
Methods
View SourceGetPropertyIndex(String)
Gets a property type index.
Declaration
public int GetPropertyIndex(string alias)
Parameters
Type | Name | Description |
---|---|---|
System. |
alias |
Returns
Type | Description |
---|---|
System. |
Remarks
The alias is case-insensitive. This is the only place where alias strings are compared.
GetPropertyType(Int32)
Gets a property type.
Declaration
public virtual IPublishedPropertyType GetPropertyType(int index)
Parameters
Type | Name | Description |
---|---|---|
System. |
index |
Returns
Type | Description |
---|---|
IPublished |
GetPropertyType(String)
Gets a property type.
Declaration
public virtual IPublishedPropertyType GetPropertyType(string alias)
Parameters
Type | Name | Description |
---|---|---|
System. |
alias |
Returns
Type | Description |
---|---|
IPublished |