Class ContentType
Domain Object used in the Provisioning template that defines a Content Type
Inherited Members
Namespace: PnP.Framework.Provisioning.Model
Assembly: PnP.Framework.dll
Syntax
public class ContentType : BaseModel, IProvisioningTemplateDescendant
Constructors
ContentType()
Constructor for ContentType class
Declaration
public ContentType()
ContentType(String, String, String, String, Boolean, Boolean, Boolean, String, Boolean, IEnumerable<FieldRef>)
Constructor for ContentType class
Declaration
public ContentType(string id, string name, string description, string group, bool contenttypeSealed, bool hidden, bool readyonly, string documentTemplate, bool overwrite, IEnumerable<FieldRef> fieldRefs)
Parameters
System. Content Type ID |
System. Content Type Name |
System. Content Type Description |
System. Content Type Group |
System. Sealed Content Type |
System. Hidden Content Type |
System. ReadOnly Content Type |
System. Document template of the content type |
System. Specify true to overwrite |
IEnumerable<Field Content Type Field References |
Properties
Description
The description of the Content Type
Declaration
public string Description { get; set; }
Property Value
System.
|
DisplayFormClientSideComponentId
Declares the ID of the SPFx Client Side Component to customize the Display Form of the Content Type.
Declaration
public string DisplayFormClientSideComponentId { get; set; }
Property Value
System.
|
DisplayFormClientSideComponentProperties
Defines the properties of the SPFx Client Side Component to customize the Display Form of the Content Type.
Declaration
public string DisplayFormClientSideComponentProperties { get; set; }
Property Value
System.
|
DisplayFormUrl
Specifies the URL of a custom display form to use for list items that have been assigned the content type
Declaration
public String DisplayFormUrl { get; set; }
Property Value
String
|
DocumentSetTemplate
Specifies the properties of the DocumentSet Template if the ContentType defines a DocumentSet
Declaration
public DocumentSetTemplate DocumentSetTemplate { get; set; }
Property Value
DocumentTemplate
Specifies the document template for the content type
Declaration
public string DocumentTemplate { get; set; }
Property Value
System.
|
EditFormClientSideComponentId
Declares the ID of the SPFx Client Side Component to customize the Edit Form of the Content Type.
Declaration
public string EditFormClientSideComponentId { get; set; }
Property Value
System.
|
EditFormClientSideComponentProperties
Defines the properties of the SPFx Client Side Component to customize the Edit Form of the Content Type.
Declaration
public string EditFormClientSideComponentProperties { get; set; }
Property Value
System.
|
EditFormUrl
Specifies the URL of a custom edit form to use for list items that have been assigned the content type
Declaration
public String EditFormUrl { get; set; }
Property Value
String
|
FieldRefs
The FieldRefs entries of the List Instance
Declaration
public FieldRefCollection FieldRefs { get; }
Property Value
Group
The group name of the content type
Declaration
public string Group { get; set; }
Property Value
System.
|
Hidden
True to define the content type as hidden. If you define a content type as hidden, SharePoint Foundation does not display that content type on the New button in list views.
Declaration
public bool Hidden { get; set; }
Property Value
System.
|
Id
The Id of the Content Type
Declaration
public string Id { get; set; }
Property Value
System.
|
Name
The name of the Content Type
Declaration
public string Name { get; set; }
Property Value
System.
|
NewFormClientSideComponentId
Declares the ID of the SPFx Client Side Component to customize the New Form of the Content Type.
Declaration
public string NewFormClientSideComponentId { get; set; }
Property Value
System.
|
NewFormClientSideComponentProperties
Defines the properties of the SPFx Client Side Component to customize the New Form of the Content Type.
Declaration
public string NewFormClientSideComponentProperties { get; set; }
Property Value
System.
|
NewFormUrl
Specifies the URL of a custom new form to use for list items that have been assigned the content type
Declaration
public String NewFormUrl { get; set; }
Property Value
String
|
Overwrite
True to overwrite an existing content type with the same ID.
Declaration
public bool Overwrite { get; set; }
Property Value
System.
|
ReadOnly
True to specify that the content type cannot be edited without explicitly removing the read-only setting. This can be done either in the user interface or in code.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.
|
Sealed
True to prevent changes to this content type. You cannot change the value of this attribute through the user interface, but you can change it in code if you have sufficient rights. You must have site collection administrator rights to unseal a content type.
Declaration
public bool Sealed { get; set; }
Property Value
System.
|
UpdateChildren
Declares whether changes to the content type will be udpated on inherited content types, optional attribute
Declaration
public bool UpdateChildren { get; set; }
Property Value
System.
|
Methods
Equals(ContentType)
Compares ContentType object based on Id, Name, Description, Group, Hidden, RedOnly, Overwrite, Sealed, DocumentTemplate, DocumentSetTemplate, FieldRefs, and UpdateChildren properties.
Declaration
public bool Equals(ContentType other)
Parameters
Content ContentType object |
Returns
System. true if the ContentType object is equal to the current object; otherwise, false. |
Equals(Object)
Compares object with ContentType
Declaration
public override bool Equals(object obj)
Parameters
System. Object that represents ContentType |
Returns
System. true if the current object is equal to the ContentType |
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
System. Returns HashCode |