Table of Contents

Interface IContentType

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Public interface to define a Content Type object of SharePoint Online

public interface IContentType : IDataModel<IContentType>, IDataModelParent, IDataModelWithContext, ISupportModules<IContentType>, IDataModelGet<IContentType>, IDataModelLoad<IContentType>, IDataModelUpdate, IDataModelDelete, IQueryableDataModel
Inherited Members
Extension Methods

Properties

All

A special property used to add an asterisk to a $select statement

object All { get; }

Property Value

object

ClientFormCustomFormatter

Gets or Sets the Client Form Custom Formatter of the Content Type

string ClientFormCustomFormatter { get; set; }

Property Value

string

Description

Gets or Sets the description of the Content Type

string Description { get; set; }

Property Value

string

DisplayFormClientSideComponentId

The unique identifier of the client-side component defined with SharePoint Framework

string DisplayFormClientSideComponentId { get; set; }

Property Value

string

DisplayFormClientSideComponentProperties

This property is only used when a DisplayFormClientSideComponentId is specified. It is optional. If non-empty, the string must contain a JSON object with custom initialization properties whose format and meaning are defined by the client-side component.

string DisplayFormClientSideComponentProperties { get; set; }

Property Value

string

DisplayFormTemplateName

Gets or Sets the Display Form template name of the Content Type

string DisplayFormTemplateName { get; set; }

Property Value

string

DisplayFormUrl

Gets or Sets the Display Form URL of the Content Type

string DisplayFormUrl { get; set; }

Property Value

string

DocumentTemplate

Gets or Sets the Document Template of the Content Type

string DocumentTemplate { get; set; }

Property Value

string

DocumentTemplateUrl

Gets or Sets the DocumentTemplate URL of the Content Type

string DocumentTemplateUrl { get; set; }

Property Value

string

EditFormClientSideComponentId

The unique identifier of the client-side component defined with SharePoint Framework

string EditFormClientSideComponentId { get; set; }

Property Value

string

EditFormClientSideComponentProperties

This property is only used when a EditFormClientSideComponentId is specified. It is optional. If non-empty, the string must contain a JSON object with custom initialization properties whose format and meaning are defined by the client-side component.

string EditFormClientSideComponentProperties { get; set; }

Property Value

string

EditFormTemplateName

Gets or Sets the Edit Form template name of the Content Type

string EditFormTemplateName { get; set; }

Property Value

string

EditFormUrl

Gets or Sets the Edit Form URL of the Content Type

string EditFormUrl { get; set; }

Property Value

string

Gets the collection of field links of the Content Type. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IFieldLinkCollection FieldLinks { get; }

Property Value

IFieldLinkCollection

Fields

Gets the collection of fields of the Content Type. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IFieldCollection Fields { get; }

Property Value

IFieldCollection

Group

Gets or Sets the group of the Content Type

string Group { get; set; }

Property Value

string

Hidden

Gets or Sets that specifies whether the Content Type is hidden

bool Hidden { get; set; }

Property Value

bool

Id

The unique ID of the Content Type as object

string Id { get; }

Property Value

string

Gets or Sets the JS Link of the Content Type

string JSLink { get; set; }

Property Value

string

MobileDisplayFormUrl

Gets or Sets the Mobile Display Form URL of the Content Type

string MobileDisplayFormUrl { get; set; }

Property Value

string

MobileEditFormUrl

Gets or Sets the Mobile Edit Form URL of the Content Type

string MobileEditFormUrl { get; set; }

Property Value

string

MobileNewFormUrl

Gets or Sets the Mobile New Form URL of the Content Type

string MobileNewFormUrl { get; set; }

Property Value

string

Name

Gets or Sets the name of the Content Type

string Name { get; set; }

Property Value

string

NewFormClientSideComponentId

The unique identifier of the client-side component defined with SharePoint Framework

string NewFormClientSideComponentId { get; set; }

Property Value

string

NewFormClientSideComponentProperties

This property is only used when a NewFormClientSideComponentId is specified. It is optional. If non-empty, the string must contain a JSON object with custom initialization properties whose format and meaning are defined by the client-side component.

string NewFormClientSideComponentProperties { get; set; }

Property Value

string

NewFormTemplateName

Gets or Sets the New Form template's name of the Content Type

string NewFormTemplateName { get; set; }

Property Value

string

NewFormUrl

Gets or Sets the New Form URL of the Content Type

string NewFormUrl { get; set; }

Property Value

string

ReadOnly

Gets or Sets whether the Content Type is read only

[SuppressMessage("Naming", "CA1716:Identifiers should not match keywords", Justification = "<Pending>")]
bool ReadOnly { get; set; }

Property Value

bool

SchemaXml

Gets or Sets the Schema XML of the Content Type

string SchemaXml { get; }

Property Value

string

SchemaXmlWithResourceTokens

Gets or Sets the Schema XML with resource tokens of the Content Type

string SchemaXmlWithResourceTokens { get; set; }

Property Value

string

Scope

Gets or Sets the scope of the Content Type

string Scope { get; set; }

Property Value

string

Sealed

Gets or Sets whether the Content Type is sealed

bool Sealed { get; set; }

Property Value

bool

StringId

The unique ID of the Content Type as string

string StringId { get; }

Property Value

string

Methods

AddField(IField)

Adds a field to the content type

void AddField(IField field)

Parameters

field IField

IField to add to this content type

AddFieldAsync(IField)

Adds a field to the content type

Task AddFieldAsync(IField field)

Parameters

field IField

IField to add to this content type

Returns

Task

AsDocumentSet()

Returns the content type as a document set

IDocumentSet AsDocumentSet()

Returns

IDocumentSet

The content type as a document set

AsDocumentSetAsync()

Returns the content type as a document set

Task<IDocumentSet> AsDocumentSetAsync()

Returns

Task<IDocumentSet>

The content type as a document set

IsPublished()

Checks if a content type is published from the hub to the sites in the SharePoint environment

bool IsPublished()

Returns

bool

IsPublishedAsync()

Checks if a content type is published from the hub to the sites in the SharePoint environment

Task<bool> IsPublishedAsync()

Returns

Task<bool>

Publish()

Publishes a content type from the hub to the sites in the SharePoint environment

void Publish()

PublishAsync()

Publishes a content type from the hub to the sites in the SharePoint environment

Task PublishAsync()

Returns

Task

Unpublish()

Unublishes a content type from the hub to the sites in the SharePoint environment

void Unpublish()

UnpublishAsync()

Unpublishes a content type from the hub to the sites in the SharePoint environment

Task UnpublishAsync()

Returns

Task