Class ContentTypeService
Represents the ContentType Service, which is an easy access to operations involving IContentType
Inheritance
System.Object
Namespace: Umbraco.Core.Services.Implement
Assembly: Umbraco.Core.dll
Syntax
public class ContentTypeService : ContentTypeServiceBase<IContentTypeRepository, IContentType, IContentTypeService>, IContentTypeService, IContentTypeBaseService<IContentType>, IContentTypeBaseService, IService
Constructors
View SourceContentTypeService(IScopeProvider, ILogger, IEventMessagesFactory, IContentService, IContentTypeRepository, IAuditRepository, IDocumentTypeContainerRepository, IEntityRepository)
Declaration
public ContentTypeService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IContentService contentService, IContentTypeRepository repository, IAuditRepository auditRepository, IDocumentTypeContainerRepository entityContainerRepository, IEntityRepository entityRepository)
Parameters
Type | Name | Description |
---|---|---|
IScopeProvider | provider | |
ILogger | logger | |
IEventMessagesFactory | eventMessagesFactory | |
IContentService | contentService | |
IContentTypeRepository | repository | |
IAuditRepository | auditRepository | |
IDocumentTypeContainerRepository | entityContainerRepository | |
IEntityRepository | entityRepository |
Properties
View SourceContainedObjectType
Declaration
protected override Guid ContainedObjectType { get; }
Property Value
Type | Description |
---|---|
System.Guid |
ReadLockIds
Declaration
protected override int[] ReadLockIds { get; }
Property Value
Type | Description |
---|---|
System.Int32[] |
This
Declaration
protected override IContentTypeService This { get; }
Property Value
Type | Description |
---|---|
IContentTypeService |
WriteLockIds
Declaration
protected override int[] WriteLockIds { get; }
Property Value
Type | Description |
---|---|
System.Int32[] |
Methods
View SourceDeleteItemsOfTypes(IEnumerable<Int32>)
Declaration
protected override void DeleteItemsOfTypes(IEnumerable<int> typeIds)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Int32> | typeIds |
GetAllContentTypeAliases(Guid[])
Gets all content type aliases across content, media and member types.
Declaration
public IEnumerable<string> GetAllContentTypeAliases(params Guid[] guids)
Parameters
Type | Name | Description |
---|---|---|
System.Guid[] | guids | Optional object types guid to restrict to content, and/or media, and/or member types. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | All content type aliases. |
Remarks
Beware! Works across content, media and member types.
GetAllContentTypeIds(String[])
Gets all content type id for aliases across content, media and member types.
Declaration
public IEnumerable<int> GetAllContentTypeIds(string[] aliases)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | aliases | Aliases to look for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Int32> | All content type ids. |
Remarks
Beware! Works across content, media and member types.
GetAllPropertyTypeAliases()
Gets all property type aliases across content, media and member types.
Declaration
public IEnumerable<string> GetAllPropertyTypeAliases()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | All property type aliases. |
Remarks
Beware! Works across content, media and member types.