Table of Contents

Interface IContentType

Namespace
ToSic.Eav.Data
Assembly
ToSic.Eav.Core.dll

Represents a Content Type information (the schema) used for IEntity objects.

[PublicApi]
public interface IContentType : IAppIdentityLight, IHasMetadata
Inherited Members

Properties

Attributes

All Attribute Definitions

IEnumerable<IContentTypeAttribute> Attributes { get; }

Property Value

IEnumerable<IContentTypeAttribute>

ContentTypeId

Old name for Id, please use Id instead

[Obsolete("Deprecated in V13, please use Id instead.")]
int ContentTypeId { get; }

Property Value

int

Remarks

Deprecated in v13

Id

Get the id of the Content Type - you usually don't need this!

int Id { get; }

Property Value

int

IsDynamic

Determines if the data for this type is dynamic (spontaneously created) or real an EAV (split into sql-tables) or json somewhere To detect if it's just a global json-type, find out what repository the type is from (RepositoryType)

bool IsDynamic { get; }

Property Value

bool

this[string]

A simple indexer to get an attribute

IContentTypeAttribute this[string fieldName] { get; }

Parameters

fieldName string

Property Value

IContentTypeAttribute

The IContentTypeAttribute of the field name or null if not found

Metadata

Get the metadata for this content-type

ContentTypeMetadata Metadata { get; }

Property Value

ContentTypeMetadata

Remarks

The metadata is either already prepared, from the same app, or from a remote app

Name

Gets the Display Name of the Content Type

string Name { get; }

Property Value

string

NameId

A unique id/name of the content-type. Previously called StaticName.

string NameId { get; }

Property Value

string

Remarks

New in v13

RepositoryAddress

Information / ID / URL to this content-type where it was stored in the repository

string RepositoryAddress { get; }

Property Value

string

RepositoryType

Information where the Content-Type was stored (file system, DB, etc.)

RepositoryTypes RepositoryType { get; }

Property Value

RepositoryTypes

Scope

Get the scope of the Content Type (like sections in a DB)

string Scope { get; }

Property Value

string

StaticName

Static name - can be a GUID or a system-term for special types

[Obsolete("Deprecated in v13, please use NameId instead")]
string StaticName { get; }

Property Value

string

Remarks

being deprecated in V13, to be replaced with NameId

Methods

Is(string)

Check if this type is the same as a name given. Will check both the name and the static name

bool Is(string name)

Parameters

name string

Returns

bool