Class Renderer
- Namespace
- Dynamicweb.Frontend.UserManagement
- Assembly
- Dynamicweb.dll
The Class Renderer represents renderer user management related entities
public sealed class Renderer
- Inheritance
-
Renderer
- Inherited Members
Methods
RenderGroup(UserGroup, Template, PagingHandler)
Renders the group
public static void RenderGroup(UserGroup group, Template template, PagingHandler pagingHandler)
Parameters
group
UserGroupGroup to be rendered
template
TemplateTemplate to render group into.
pagingHandler
PagingHandlerPaging handler used to split results to pages
Remarks
Contained users and subgroups will not be rendered and results will be sorted by name in ascending direction
RenderGroup(UserGroup, Template, bool, SortField, SortOrder, PagingHandler)
Renders the group
public static void RenderGroup(UserGroup group, Template template, bool includeGroupsAndUsers, SortField userSortField, SortOrder userSortOrder, PagingHandler pagingHandler)
Parameters
group
UserGroupGroup to be rendered
template
TemplateTemplate to render group into.
includeGroupsAndUsers
boolIndicates whether to render сontained users and subgroups
userSortField
SortFieldUser Field that used for ordering
userSortOrder
SortOrderDirection used for ordering
pagingHandler
PagingHandlerPaging handler used to split results to pages
RenderGroupTemplateExtenders(UserGroup, Template, bool, string, SortField, SortOrder, PagingHandler)
Extends a User template with TemplateExtenders
public static void RenderGroupTemplateExtenders(UserGroup group, Template template, bool includeGroupsAndUsers, string elementName, SortField userSortField, SortOrder userSortOrder, PagingHandler pagingHandler)
Parameters
group
UserGroupThe currently rendered group
template
TemplateThe template rendering the user
includeGroupsAndUsers
boolFlag - include groups and users
elementName
stringElement name
userSortField
SortFieldUsers sort field
userSortOrder
SortOrderUsers sort order
pagingHandler
PagingHandlerPaging handler
RenderGroups(IEnumerable<UserGroup>, Template, PagingHandler)
Renders the groups
public static void RenderGroups(IEnumerable<UserGroup> groups, Template template, PagingHandler pagingHandler)
Parameters
groups
IEnumerable<UserGroup>collection of groups to be rendered
template
TemplateTemplate to render users into.
pagingHandler
PagingHandlerPaging handler used to split results to pages
Remarks
Contained users and subgroups will not be rendered and results will be sorted by name in ascending direction
RenderGroups(IEnumerable<UserGroup>, Template, bool, SortField, SortOrder, PagingHandler)
Renders the groups
public static void RenderGroups(IEnumerable<UserGroup> groups, Template template, bool includeGroupsAndUsers, SortField userSortField, SortOrder userSortOrder, PagingHandler pagingHandler)
Parameters
groups
IEnumerable<UserGroup>collection of groups to be rendered
template
TemplateTemplate to render users into.
includeGroupsAndUsers
boolIndicates whether to render сontained users and subgroups
userSortField
SortFieldUser Field that used for ordering
userSortOrder
SortOrderDirection used for ordering
pagingHandler
PagingHandlerPaging handler used to split results to pages
Remarks
Groups will be rendered inside loop named "Groups"
RenderSearchForm(Template)
Renders the search form.
public static void RenderSearchForm(Template searchBoxTemplate)
Parameters
searchBoxTemplate
TemplateTemplate containing search box markup.
RenderSearchForm(Template, Template, int)
Renders the search form.
public static void RenderSearchForm(Template searchBoxTemplate, Template masterTemplate, int paragraphID)
Parameters
searchBoxTemplate
TemplateTemplate containing search form markup.
masterTemplate
TemplateTemplate to render search form contents into.
paragraphID
intAn ID of the module paragraph.
RenderUser(User, Template, bool, PagingHandler)
Renders the user
public static void RenderUser(User user, Template template, bool includeParentGroups, PagingHandler pagingHandler)
Parameters
user
UserUser to be rendered
template
TemplateTemplate to render user into.
includeParentGroups
boolIndicates whether to render parent groups
pagingHandler
PagingHandlerPaging handler used to split results to pages
Remarks
Tags for user editing will be rendered also
RenderUser(User, Template, bool, PagingHandler, bool)
Renders the user
public static void RenderUser(User user, Template template, bool includeParentGroups, PagingHandler pagingHandler, bool allowEdit)
Parameters
user
UserUser to be rendered
template
TemplateTemplate to render user into.
includeParentGroups
boolIndicates whether to render parent groups
pagingHandler
PagingHandlerPaging handler used to split results to pages
allowEdit
boolIndicates whether to render tags for user editing
RenderUserAddress(UserAddress, Template)
Renders the address related tags
public static void RenderUserAddress(UserAddress address, Template template)
Parameters
address
UserAddressAddress to be rendered
template
TemplateTemplate to render the address tags into.
RenderUserAddressAdd(int, bool, int, Template, List<UserManagementFormField>)
Renders the user add/update address related tags
public static void RenderUserAddressAdd(int userID, bool forUpdate, int addressId, Template template, List<UserManagementFormField> errors)
Parameters
userID
intID of User address will be added/Updated
forUpdate
boolIndicates is adding new address or update existing
addressId
intID of address object
template
TemplateTemplate to render user address tags into.
errors
List<UserManagementFormField>List of errors
RenderUserAddresses(User, Template, ParagraphSettings)
Renders the all of the user addresses
public static void RenderUserAddresses(User user, Template template, ParagraphSettings settings)
Parameters
user
UserUser who's addresses will be rendered
template
TemplateTemplate to render the address tags into.
settings
ParagraphSettingsSettings of the related paragraph
RenderUserCreate(IEnumerable<UserGroup>, IEnumerable<UserGroup>, CreateProfileApprovalTypes, IDictionary<string, UserManagementFormField>, Template, PagingHandler)
Renders the user edit related tags
public static void RenderUserCreate(IEnumerable<UserGroup> NewUserGroups, IEnumerable<UserGroup> SelectableGroups, CreateProfileApprovalTypes ApprovalType, IDictionary<string, UserManagementFormField> errors, Template template, PagingHandler pagingHandler)
Parameters
NewUserGroups
IEnumerable<UserGroup>Groups where newly created user will be added
SelectableGroups
IEnumerable<UserGroup>Groups which are allowed for user to join in
ApprovalType
CreateProfileApprovalTypeserrors
IDictionary<string, UserManagementFormField>Collection used for handling errors
template
TemplateTemplate to render user into.
pagingHandler
PagingHandlerPaging handler used to split results to pages
RenderUserEdit(User, IEnumerable<UserGroup>, IDictionary<string, UserManagementFormField>, Template, PagingHandler)
Renders the user edit related tags
public static void RenderUserEdit(User user, IEnumerable<UserGroup> selectableGroups, IDictionary<string, UserManagementFormField> errors, Template template, PagingHandler pagingHandler)
Parameters
user
UserUser to be rendered
selectableGroups
IEnumerable<UserGroup>Groups which are allowed for user to join in
errors
IDictionary<string, UserManagementFormField>Collection used for handling errors
template
TemplateTemplate to render user into.
pagingHandler
PagingHandlerPaging handler used to split results to pages
RenderUserNameInputs(IDictionary<string, UserManagementFormField>, Template, string)
Renders the user name input controls related tags
public static void RenderUserNameInputs(IDictionary<string, UserManagementFormField> errors, Template template, string userName = "")
Parameters
errors
IDictionary<string, UserManagementFormField>Collection used for handling errors
template
TemplateTemplate to render inputs related tags into.
userName
stringUser name as default value for input control
RenderUserTemplateExtenders(UserAction, User, Template, bool, PagingHandler)
Extends a User template with TemplateExtenders
public static void RenderUserTemplateExtenders(UserAction action, User user, Template template, bool includeParentGroups, PagingHandler pagingHandler)
Parameters
action
UserActionThe current action
user
UserThe currently rendered user
template
TemplateThe template rendering the user
includeParentGroups
boolFlag - include parent groups
pagingHandler
PagingHandlerPaging handler
RenderUsers(IEnumerable<User>, Template, SortField, SortOrder, bool, PagingHandler, UserGroup)
Renders the users
public static void RenderUsers(IEnumerable<User> users, Template template, SortField sortField, SortOrder sortOrder, bool includeParentGroups, PagingHandler pagingHandler, UserGroup sortInGroup)
Parameters
users
IEnumerable<User>collection of users to be rendered
template
TemplateTemplate to render users into.
sortField
SortFieldUser Field that used for ordering
sortOrder
SortOrderDirection used for ordering
includeParentGroups
boolIndicates whether to render parent groups
pagingHandler
PagingHandlerPaging handler used to split results to pages
sortInGroup
UserGroupThe Group in which users will be sorted
Remarks
Users will be rendered inside loop named "Users"
RenderUsersAndGroups(IEnumerable<User>, IEnumerable<UserGroup>, int, SortField, SortOrder, Template, PagingHandler)
Renders the users and groups
public static void RenderUsersAndGroups(IEnumerable<User> users, IEnumerable<UserGroup> groups, int numSubgroupLevels, SortField userSortField, SortOrder userSortOrder, Template template, PagingHandler pagingHandler)
Parameters
users
IEnumerable<User>collection of users to be rendered
groups
IEnumerable<UserGroup>collection of groups to be rendered
numSubgroupLevels
intThe number of subgroups that should be included into rendering
userSortField
SortFieldUser Field that used for ordering
userSortOrder
SortOrderDirection used for ordering
template
TemplateTemplate to render users and groups into.
pagingHandler
PagingHandlerPaging handler used to split results to pages