Class AvailableContentTypeService
Default implemenation of IAvailableContentTypes.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class AvailableContentTypeService : IAvailableContentTypes
Constructors
AvailableContentTypeService(ServiceAccessor<IContentTypeRepository>, IAvailableModelSettingsRepository, IAvailableSettingsRepository)
Initializes a new instance of the AvailableContentTypeService class.
Declaration
public AvailableContentTypeService(ServiceAccessor<IContentTypeRepository> contentTypeRepositoryAccessor, IAvailableModelSettingsRepository modelRepository, IAvailableSettingsRepository typeSettingsRepository)
Parameters
Type | Name | Description |
---|---|---|
ServiceAccessor<IContentTypeRepository> | contentTypeRepositoryAccessor | The content type repository accessor. |
IAvailableModelSettingsRepository | modelRepository | The model repository. |
IAvailableSettingsRepository | typeSettingsRepository | The type settings repository. |
Methods
GetSetting(String)
Gets the current settings for available content types for a ContentType given by name contentTypeName
.
Declaration
public virtual 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 PageData of the ContentType named childContentTypeName
is allowed to be created under a page of
the PageType named parentContentTypeName
.
Declaration
public virtual 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 |
|
ListAvailable(String, IPrincipal)
Lists all available ContentType that can be created under a content instance of content type with name contentTypeName
.
The list is filtered due to the user
and the ACL
Declaration
public virtual IList<ContentType> ListAvailable(string contentTypeName, IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName | Name of the content type. |
System.Security.Principal.IPrincipal | user | The user. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ContentType> |
Remarks
This method does not take any uncomitted data into account.