Search Results for

    Show / Hide Table of Contents
    View Source

    Class MediaType

    Represents the content type that a Media object is based on

    Inheritance
    System.Object
    BeingDirtyBase
    EntityBase
    TreeEntityBase
    ContentTypeBase
    ContentTypeCompositionBase
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(IsReference = true)]
    public class MediaType : ContentTypeCompositionBase, IMediaType, IContentTypeComposition, IContentTypeBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    MediaType(IShortStringHelper, Int32)

    Constuctor for creating a MediaType with the parent's id.

    Declaration
    public MediaType(IShortStringHelper shortStringHelper, int parentId)
    Parameters
    Type Name Description
    IShortStringHelper shortStringHelper
    System.Int32 parentId
    Remarks

    Only use this for creating MediaTypes at the root (with ParentId -1).

    View Source

    MediaType(IShortStringHelper, IMediaType)

    Constuctor for creating a MediaType with the parent as an inherited type.

    Declaration
    public MediaType(IShortStringHelper shortStringHelper, IMediaType parent)
    Parameters
    Type Name Description
    IShortStringHelper shortStringHelper
    IMediaType parent
    Remarks

    Use this to ensure inheritance from parent.

    View Source

    MediaType(IShortStringHelper, IMediaType, String)

    Constuctor for creating a MediaType with the parent as an inherited type.

    Declaration
    public MediaType(IShortStringHelper shortStringHelper, IMediaType parent, string alias)
    Parameters
    Type Name Description
    IShortStringHelper shortStringHelper
    IMediaType parent
    System.String alias
    Remarks

    Use this to ensure inheritance from parent.

    Fields

    View Source

    SupportsPublishingConst

    Declaration
    public const bool SupportsPublishingConst = false
    Field Value
    Type Description
    System.Boolean

    Properties

    View Source

    SupportsPublishing

    Gets a value indicating whether the content type supports publishing.

    Declaration
    public override bool SupportsPublishing { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    A publishing content type supports draft and published values for properties. It is possible to retrieve either the draft (default) or published value of a property. Setting the value always sets the draft value, which then needs to be published.

    A non-publishing content type only supports one value for properties. Getting the draft or published value of a property returns the same thing, and publishing a value property has no effect.

    Methods

    View Source

    ToSimple()

    Gets an ISimpleContentType corresponding to this content type.

    Declaration
    public override ISimpleContentType ToSimple()
    Returns
    Type Description
    ISimpleContentType

    Explicit Interface Implementations

    View Source

    IMediaType.DeepCloneWithResetIdentities(String)

    Creates a deep clone of the current entity with its identity/alias and it's property identities reset

    Declaration
    IMediaType IMediaType.DeepCloneWithResetIdentities(string newAlias)
    Parameters
    Type Name Description
    System.String newAlias
    Returns
    Type Description
    IMediaType
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • MediaType(IShortStringHelper, Int32)
      • MediaType(IShortStringHelper, IMediaType)
      • MediaType(IShortStringHelper, IMediaType, String)
    • Fields
      • SupportsPublishingConst
    • Properties
      • SupportsPublishing
    • Methods
      • ToSimple()
    • Explicit Interface Implementations
      • IMediaType.DeepCloneWithResetIdentities(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX