Class PersonaBarController
Implements
Namespace: Dnn.PersonaBar.Library.Controllers
Assembly: Dnn.PersonaBar.Library.dll
Syntax
public class PersonaBarController : ServiceLocator<IPersonaBarController, PersonaBarController>, IPersonaBarController
Constructors
PersonaBarController()
Initializes a new instance of the PersonaBarController class.
Declaration
[Obsolete("Deprecated in DotNetNuke 10.0.0. Please use overload with IServiceScopeFactory. Scheduled removal in v12.0.0.")]
public PersonaBarController()
PersonaBarController(IServiceScopeFactory, IPersonaBarRepository)
Initializes a new instance of the PersonaBarController class.
Declaration
public PersonaBarController(IServiceScopeFactory serviceScopeFactory, IPersonaBarRepository personaBarRepository)
Parameters
Type | Name | Description |
---|---|---|
IServiceScopeFactory | serviceScopeFactory | The service scope factory. |
IPersonaBarRepository | personaBarRepository | The Persona Bar repository. |
Methods
GetFactory()
Declaration
protected override Func<IPersonaBarController> GetFactory()
Returns
Type | Description |
---|---|
Func<IPersonaBarController> |
GetMenu(PortalSettings, UserInfo)
Gets the menu structure of the persona bar.
Declaration
public PersonaBarMenu GetMenu(PortalSettings portalSettings, UserInfo user)
Parameters
Type | Name | Description |
---|---|---|
PortalSettings | portalSettings | The portal settings. |
UserInfo | user |
Returns
Type | Description |
---|---|
PersonaBarMenu | Persona bar menu structure for the user. |
IsVisible(PortalSettings, UserInfo, MenuItem)
Whether the menu item is visible.
Declaration
public bool IsVisible(PortalSettings portalSettings, UserInfo user, MenuItem menuItem)
Parameters
Type | Name | Description |
---|---|---|
PortalSettings | portalSettings | Portal Settings. |
UserInfo | user | User Info. |
MenuItem | menuItem | The menu item. |
Returns
Type | Description |
---|---|
bool |