Class VisitorGroupMarkupGenerator
Generates markup for fragments that are restricted for a list of visitor groups.
Inheritance
Namespace: EPiServer.Core.Html.StringParsing
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3Syntax
public class VisitorGroupMarkupGenerator : Object, ISecuredFragmentMarkupGenerator, IContentGroupConstructors
VisitorGroupMarkupGenerator(IVisitorGroupRepository, IVisitorGroupRoleRepository, String, IEnumerable<String>, LocalizationService)
Initializes a new instance of the VisitorGroupMarkupGenerator class.
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, IVisitorGroupRoleRepository visitorGroupRoleRepository, string contentGroup, IEnumerable<string> visitorGroups, LocalizationService localizationService)Parameters
| Type | Name | Description | 
|---|---|---|
| IVisitorGroupRepository | visitorGroupRepository | |
| IVisitorGroupRoleRepository | visitorGroupRoleRepository | |
| System.String | contentGroup | |
| System.Collections.Generic.IEnumerable<System.String> | visitorGroups | |
| LocalizationService | localizationService | 
VisitorGroupMarkupGenerator(IVisitorGroupRepository, String, IRoleSecurityDescriptor)
Initializes a new instance of the VisitorGroupMarkupGenerator class.
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, string contentGroup, IRoleSecurityDescriptor roleSecurityDescriptor)Parameters
| Type | Name | Description | 
|---|---|---|
| IVisitorGroupRepository | visitorGroupRepository | The visitor group repository. | 
| System.String | contentGroup | The content group. | 
| IRoleSecurityDescriptor | roleSecurityDescriptor | The role security descriptor. | 
VisitorGroupMarkupGenerator(IVisitorGroupRepository, String, IRoleSecurityDescriptor, LocalizationService)
Initializes a new instance of the VisitorGroupMarkupGenerator class.
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, string contentGroup, IRoleSecurityDescriptor roleSecurityDescriptor, LocalizationService localizationService)Parameters
| Type | Name | Description | 
|---|---|---|
| IVisitorGroupRepository | visitorGroupRepository | The visitor group repository. | 
| System.String | contentGroup | The content group. | 
| IRoleSecurityDescriptor | roleSecurityDescriptor | The role security descriptor. | 
| LocalizationService | localizationService | The resource locator. | 
Properties
ContentGroup
Gets or sets the content group.
Declaration
public string ContentGroup { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | The content group. | 
RoleSecurityDescriptor
Gets or sets the role security descriptor that has information on which groups the content should be restricted to.
Declaration
public IRoleSecurityDescriptor RoleSecurityDescriptor { get; set; }Property Value
| Type | Description | 
|---|---|
| IRoleSecurityDescriptor | The role security descriptor. | 
Methods
GenerateCompressedGroupDisplayInformation()
Generates markup for an html editor to display information that the content is restricted to groups.
Declaration
public string GenerateCompressedGroupDisplayInformation()Returns
| Type | Description | 
|---|---|
| System.String | Markup for an html editor to display information that the content is restricted to groups. | 
Remarks
Used for inline elements.
See Also
GenerateGroupDisplayInformation()
Generates markup for an html editor to display the groups that the content is restricted to.
Declaration
public string GenerateGroupDisplayInformation()Returns
| Type | Description | 
|---|---|
| System.String | Markup for an html editor to display the groups that the content is restricted to. | 
Remarks
Used for block elements.
See Also
GenerateGroupStorageInformation()
Generates a string that can be used to store the groups that the content should be restricted to.
Declaration
public string GenerateGroupStorageInformation()Returns
| Type | Description | 
|---|---|
| System.String | A string that can be used to store the groups that the content should be restricted to. | 
Remarks
VisitorGroupMarkupGenerator uses a comma separated string with the id:s for the visitor groups.
