Interface IContentType
Represents a Content Type information (the schema) used for IEntity objects.
Inherited Members
Namespace: ToSic.Eav.Data
Assembly: ToSic.Eav.Core.dll
Syntax
[PublicApi_Stable_ForUseInYourCode]
public interface IContentType : IAppIdentityLight, IHasMetadata
Properties
| Improve this Doc View SourceAttributes
All Attribute Definitions
Declaration
IEnumerable<IContentTypeAttribute> Attributes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IContentTypeAttribute> |
ContentTypeId
Old name for Id, please use Id instead
Declaration
[Obsolete("Deprecated in V13, please use Id instead.")]
int ContentTypeId { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
Deprecated in v13
Id
Get the id of the Content Type - you usually don't need this!
Declaration
int Id { get; }
Property Value
Type | Description |
---|---|
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)
Declaration
bool IsDynamic { get; }
Property Value
Type | Description |
---|---|
bool |
this[string]
A simple indexer to get an attribute
Declaration
IContentTypeAttribute this[string fieldName] { get; }
Parameters
Type | Name | Description |
---|---|---|
string | fieldName |
Property Value
Type | Description |
---|---|
IContentTypeAttribute | The IContentTypeAttribute of the field name or |
Metadata
Get the metadata for this content-type
Declaration
ContentTypeMetadata Metadata { get; }
Property Value
Type | Description |
---|---|
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
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
NameId
A unique id/name of the content-type. Previously called StaticName.
Declaration
string NameId { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
New in v13
RepositoryAddress
Information / ID / URL to this content-type where it was stored in the repository
Declaration
string RepositoryAddress { get; }
Property Value
Type | Description |
---|---|
string |
RepositoryType
Information where the Content-Type was stored (file system, DB, etc.)
Declaration
RepositoryTypes RepositoryType { get; }
Property Value
Type | Description |
---|---|
RepositoryTypes |
Scope
Get the scope of the Content Type (like sections in a DB)
Declaration
string Scope { get; }
Property Value
Type | Description |
---|---|
string |
StaticName
Static name - can be a GUID or a system-term for special types
Declaration
[Obsolete("Deprecated in v13, please use NameId instead")]
string StaticName { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
being deprecated in V13, to be replaced with NameId
Methods
| Improve this Doc View SourceIs(string)
Check if this type is the same as a name given. Will check both the name and the static name
Declaration
bool Is(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
bool |