C# Class Core.Web.Helpers.WidgetHelper

Inheritance: IWidgetHelper
Show file Open project: coreframework/Core-Framework

Public Methods

Method Description
GetAvailableWidgets ( bool isTemplate ) : IList
GetWidgetClientId ( long widgetId ) : String

Gets the widget client id.

GetWidgetHolderStyles ( PageWidgetSettings settings ) : String
GetWidgetStyles ( PageWidgetSettings settings ) : String
GetWidgetViewModel ( PageWidget pageWidget ) : WidgetHolderViewModel

Gets the widget view model.

GetWidgetViewModel ( long pageWidgetId ) : WidgetHolderViewModel

Gets the widget view model.

IsManageWidgetAllowed ( PageWidget pageWidget, ICorePrincipal user, long entityId ) : bool

Determines whether [is manage widget allowed] [the specified widget identifier].

IsWidgetEnabled ( String widgetIdentifier ) : bool

Determines whether [is widget enabled] [the specified widget identifier].

IsWidgetEnabled ( Widget widget ) : bool

Determines whether [is widget enabled] [the specified widget].

UpdatePageWidgetInstance ( long pageWidgetId, long instanceId, ICorePrincipal user ) : void
UpdatePageWidgetInstanceId ( long pageWidgetId, long instanceId, ICorePrincipal user ) : void

Updates the page widget instance.

Private Methods

Method Description
AppendStyleString ( StringBuilder builder, String styleName, String styleValue ) : void

Method Details

GetAvailableWidgets() public static method

public static GetAvailableWidgets ( bool isTemplate ) : IList
isTemplate bool
return IList

GetWidgetClientId() public static method

Gets the widget client id.
public static GetWidgetClientId ( long widgetId ) : String
widgetId long The widget id.
return String

GetWidgetHolderStyles() public static method

public static GetWidgetHolderStyles ( PageWidgetSettings settings ) : String
settings Core.Web.NHibernate.Models.PageWidgetSettings
return String

GetWidgetStyles() public static method

public static GetWidgetStyles ( PageWidgetSettings settings ) : String
settings Core.Web.NHibernate.Models.PageWidgetSettings
return String

GetWidgetViewModel() public static method

Gets the widget view model.
public static GetWidgetViewModel ( PageWidget pageWidget ) : WidgetHolderViewModel
pageWidget Core.Web.NHibernate.Models.PageWidget The page widget.
return Core.Web.Models.WidgetHolderViewModel

GetWidgetViewModel() public static method

Gets the widget view model.
public static GetWidgetViewModel ( long pageWidgetId ) : WidgetHolderViewModel
pageWidgetId long The page widget id.
return Core.Web.Models.WidgetHolderViewModel

IsManageWidgetAllowed() public static method

Determines whether [is manage widget allowed] [the specified widget identifier].
public static IsManageWidgetAllowed ( PageWidget pageWidget, ICorePrincipal user, long entityId ) : bool
pageWidget Core.Web.NHibernate.Models.PageWidget The page widget.
user ICorePrincipal The user.
entityId long The entity id.
return bool

IsWidgetEnabled() public method

Determines whether [is widget enabled] [the specified widget identifier].
public IsWidgetEnabled ( String widgetIdentifier ) : bool
widgetIdentifier String The widget identifier.
return bool

IsWidgetEnabled() public method

Determines whether [is widget enabled] [the specified widget].
public IsWidgetEnabled ( Widget widget ) : bool
widget Widget The widget.
return bool

UpdatePageWidgetInstance() public method

public UpdatePageWidgetInstance ( long pageWidgetId, long instanceId, ICorePrincipal user ) : void
pageWidgetId long
instanceId long
user ICorePrincipal
return void

UpdatePageWidgetInstanceId() public static method

Updates the page widget instance.
public static UpdatePageWidgetInstanceId ( long pageWidgetId, long instanceId, ICorePrincipal user ) : void
pageWidgetId long The page widget id.
instanceId long The instance id.
user ICorePrincipal The user.
return void