November Happy Hour will be moved to Thursday December 5th.

Class ContentTypeAvailabilityService

Abstract class for avalibale content types that has both filtering by access on ContentType and GroupDefinition.

Inheritance
System.Object
ContentTypeAvailabilityService
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public abstract class ContentTypeAvailabilityService

Constructors

ContentTypeAvailabilityService()

Declaration
protected ContentTypeAvailabilityService()

Methods

GetSetting(String)

Gets the current settings for available content types for a ContentType given by name contentTypeName.

Declaration
public abstract AvailableSetting GetSetting(string contentTypeName)
Parameters
Type Name Description
System.String contentTypeName

Name of the content type.

Returns
Type Description
AvailableSetting

IsAllowed(String, String)

Determines whether a IContent of the ContentType named childContentTypeName is allowed to be created under a Content of the ContentType named parentContentTypeName.

Declaration
public abstract bool IsAllowed(string parentContentTypeName, string childContentTypeName)
Parameters
Type Name Description
System.String parentContentTypeName

The name of the parent ContentType.

System.String childContentTypeName

The name of child ContentType.

Returns
Type Description
System.Boolean

true if the specified content type is allowed; otherwise, false.

ListAvailable(IContent, Boolean, IPrincipal)

Lists all available ContentType that can be created under a content instance of content content.

Declaration
public abstract IList<ContentType> ListAvailable(IContent content, bool contentFolder, IPrincipal user)
Parameters
Type Name Description
IContent content
System.Boolean contentFolder

If true then list all available ContentType that can be created under ContentFolder otherwise list all avalible ContentType under content type of the content

System.Security.Principal.IPrincipal user
Returns
Type Description
System.Collections.Generic.IList<ContentType>
Remarks

The list is filtered due to the user, IContentSecurable and RequiredAccessAttribute on the GroupDefinitionsAttribute

ListAvailable(String, IPrincipal)

Lists all available ContentType that can be created under a content instance of type contentTypeName.

Declaration
public abstract IList<ContentType> ListAvailable(string contentTypeName, IPrincipal user)
Parameters
Type Name Description
System.String contentTypeName
System.Security.Principal.IPrincipal user
Returns
Type Description
System.Collections.Generic.IList<ContentType>
Remarks

The list is filtered due to the user, IContentSecurable but not RequiredAccessAttribute on the GroupDefinitionsAttribute

Extension Methods