Class VisitorGroupMarkupGenerator
Generates markup for fragments that are restricted for a list of visitor groups.
Inheritance
Inherited Members
Namespace: EPiServer.Core.Html.StringParsing
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class VisitorGroupMarkupGenerator : ISecuredFragmentMarkupGenerator, IContentGroup
Constructors
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 |
---|---|---|
EPiServer.Personalization.VisitorGroups.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 |
---|---|---|
EPiServer.Personalization.VisitorGroups.IVisitorGroupRepository | visitorGroupRepository | The visitor group repository. |
System.String | contentGroup | The content group. |
IRoleSecurityDescriptor | roleSecurityDescriptor | The role security descriptor. |
LocalizationService | localizationService | The resource locator. |
VisitorGroupMarkupGenerator(IVisitorGroupRepository, String, IEnumerable<String>)
Initializes a new instance of the VisitorGroupMarkupGenerator class.
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, string contentGroup, IEnumerable<string> visitorGroups)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Personalization.VisitorGroups.IVisitorGroupRepository | visitorGroupRepository | The visitor group repository. |
System.String | contentGroup | The content group. |
System.Collections.Generic.IEnumerable<System.String> | visitorGroups | The visitor groups. |
VisitorGroupMarkupGenerator(IVisitorGroupRepository, String, IEnumerable<String>, LocalizationService)
Initializes a new instance of the VisitorGroupMarkupGenerator class.
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, string contentGroup, IEnumerable<string> visitorGroups, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Personalization.VisitorGroups.IVisitorGroupRepository | visitorGroupRepository | The visitor group repository. |
System.String | contentGroup | The content group. |
System.Collections.Generic.IEnumerable<System.String> | visitorGroups | The visitor groups. |
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.