Class ContentTypeExtensions
Extension methods for data-related operations.
[PublicApi]
public static class ContentTypeExtensions
- Inheritance
-
objectContentTypeExtensions
Remarks
Introduced in v21.
To use this, make sure you have using ToSic.Eav.Data; in your file.
Methods
IsBoolean(IContentTypeField)
Detect if the fieldDef is of Boolean type.
public static bool IsBoolean(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsCustom(IContentTypeField)
Detect if the fieldDef is of Custom type. This is mainly used for GPS coordinates.
public static bool IsCustom(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsDateTime(IContentTypeField)
Detect if the fieldDef is of DateTime type.
public static bool IsDateTime(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsEmpty(IContentTypeField)
Detect if the fieldDef is of Empty type. This means it won't store any data and is mainly used for grouping or messages.
public static bool IsEmpty(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsEntity(IContentTypeField)
Detect if the fieldDef is of Entity type.
public static bool IsEntity(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsEphemeral(IContentTypeField)
Ephemeral attributes are not stored in the database and are mainly used for formulas or temporary data.
public static bool IsEphemeral(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
Remarks
Ephemeral attributes are not stored in the database and are mainly used for formulas or temporary data.
Added a bit later in v21.08.
IsGroupEnd(IContentTypeField)
Empty fields can mark the end of a group.
public static bool IsGroupEnd(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsGroupTitle(IContentTypeField)
Empty fields can be group titles.
public static bool IsGroupTitle(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsHyperlink(IContentTypeField)
Detect if the fieldDef is of Hyperlink type.
public static bool IsHyperlink(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsMessage(IContentTypeField)
Empty fields can be used as messages.
public static bool IsMessage(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsNumber(IContentTypeField)
Detect if the fieldDef is of Number type.
public static bool IsNumber(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField
Returns
IsString(IContentTypeField)
Detect if the fieldDef is of String type.
public static bool IsString(this IContentTypeField fieldDef)
Parameters
fieldDefIContentTypeField