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, IContentGroup
Constructors
VisitorGroupMarkupGenerator(IVisitorGroupRepository, IVisitorGroupRoleRepository, String, IEnumerable<String>, LocalizationService)
Initializes a new instance of the Visitor
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, IVisitorGroupRoleRepository visitorGroupRoleRepository, string contentGroup, IEnumerable<string> visitorGroups, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
IVisitor |
visitorGroupRepository | |
IVisitor |
visitorGroupRoleRepository | |
System. |
contentGroup | |
System. |
visitorGroups | |
Localization |
localizationService |
VisitorGroupMarkupGenerator(IVisitorGroupRepository, String, IRoleSecurityDescriptor)
Initializes a new instance of the Visitor
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, string contentGroup, IRoleSecurityDescriptor roleSecurityDescriptor)
Parameters
Type | Name | Description |
---|---|---|
IVisitor |
visitorGroupRepository | The visitor group repository. |
System. |
contentGroup | The content group. |
IRole |
roleSecurityDescriptor | The role security descriptor. |
VisitorGroupMarkupGenerator(IVisitorGroupRepository, String, IRoleSecurityDescriptor, LocalizationService)
Initializes a new instance of the Visitor
Declaration
public VisitorGroupMarkupGenerator(IVisitorGroupRepository visitorGroupRepository, string contentGroup, IRoleSecurityDescriptor roleSecurityDescriptor, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
IVisitor |
visitorGroupRepository | The visitor group repository. |
System. |
contentGroup | The content group. |
IRole |
roleSecurityDescriptor | The role security descriptor. |
Localization |
localizationService | The resource locator. |
Properties
ContentGroup
Gets or sets the content group.
Declaration
public string ContentGroup { get; set; }
Property Value
Type | Description |
---|---|
System. |
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 |
---|---|
IRole |
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. |
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. |
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. |
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.