C# Class Core.Web.Helpers.PageHelper

Show file Open project: coreframework/Core-Framework

Public Methods

Method Description
AddWidgetToPage ( long pageId, long widgetId, ICorePrincipal user, long templateWidgetId ) : PageWidget

Adds the widget to page.

BindPageViewModel ( Page page, ICorePrincipal user ) : PageViewModel

Binds the page view model.

ChangePageMode ( PageMode pageMode ) : void
ClonePageSettings ( Page sourcePage, Page targetPage ) : bool

Clones the target page settings to source page.

ClonePageSettingsFromTemplate ( Page template, Page targetPage, long widgetId ) : bool
Flatten ( NavigationMenuItemModel root, List items, int level, bool addNewPagesAccess, PageMode pageMode ) : List
GetNavigationMenu ( PageViewModel currentPage, ICorePrincipal user ) : NavigationMenuModel

Gets the navigation menu.

GetPageHolderStyles ( PageSettings settings ) : String

Gets the page holder styles.

GetPageInnerHolderStyles ( PageSettings settings ) : String

Gets the page inner holder styles.

RemovePage ( Page page ) : void

Removes the page.

RemoveWidgetFromPage ( long pageWidgetId, ICorePrincipal user ) : void

Removes the widget from page.

UnlinkPage ( Page page ) : void

Unlinks the page.

UnlinkTemplatePages ( Page pageTemplate ) : void

Unlinks the template pages.

UpdatePagesPositions ( long pageId, int orderNumber ) : void

Updates the pages positions.

UpdateWidgetsPositions ( long pageWidgetId, int pageSection, int columnNumber, int orderNumber, ICorePrincipal user ) : void

Updates the widgets positions.

Private Methods

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

Appends the style string.

CloneWidgetInstance ( PageWidget widget ) : long?

Clones the widget instance.

Method Details

AddWidgetToPage() public static method

Adds the widget to page.
public static AddWidgetToPage ( long pageId, long widgetId, ICorePrincipal user, long templateWidgetId ) : PageWidget
pageId long The page id.
widgetId long The widget id.
user ICorePrincipal The user.
templateWidgetId long The template widget id.
return Core.Web.NHibernate.Models.PageWidget

BindPageViewModel() public static method

Binds the page view model.
public static BindPageViewModel ( Page page, ICorePrincipal user ) : PageViewModel
page Page The page.
user ICorePrincipal The user.
return PageViewModel

ChangePageMode() public static method

public static ChangePageMode ( PageMode pageMode ) : void
pageMode PageMode
return void

ClonePageSettings() public static method

Clones the target page settings to source page.
public static ClonePageSettings ( Page sourcePage, Page targetPage ) : bool
sourcePage Page The source page.
targetPage Page The target page.
return bool

ClonePageSettingsFromTemplate() public static method

public static ClonePageSettingsFromTemplate ( Page template, Page targetPage, long widgetId ) : bool
template Page
targetPage Page
widgetId long
return bool

Flatten() public static method

public static Flatten ( NavigationMenuItemModel root, List items, int level, bool addNewPagesAccess, PageMode pageMode ) : List
root NavigationMenuItemModel
items List
level int
addNewPagesAccess bool
pageMode PageMode
return List

GetNavigationMenu() public static method

Gets the navigation menu.
public static GetNavigationMenu ( PageViewModel currentPage, ICorePrincipal user ) : NavigationMenuModel
currentPage PageViewModel
user ICorePrincipal
return Core.Web.Models.NavigationMenuModel

GetPageHolderStyles() public static method

Gets the page holder styles.
public static GetPageHolderStyles ( PageSettings settings ) : String
settings Core.Web.NHibernate.Models.PageSettings The settings.
return String

GetPageInnerHolderStyles() public static method

Gets the page inner holder styles.
public static GetPageInnerHolderStyles ( PageSettings settings ) : String
settings Core.Web.NHibernate.Models.PageSettings The settings.
return String

RemovePage() public static method

Removes the page.
public static RemovePage ( Page page ) : void
page Page The page.
return void

RemoveWidgetFromPage() public static method

Removes the widget from page.
public static RemoveWidgetFromPage ( long pageWidgetId, ICorePrincipal user ) : void
pageWidgetId long The page widget id.
user ICorePrincipal The user.
return void

UnlinkPage() public static method

Unlinks the page.
public static UnlinkPage ( Page page ) : void
page Page The page.
return void

UnlinkTemplatePages() public static method

Unlinks the template pages.
public static UnlinkTemplatePages ( Page pageTemplate ) : void
pageTemplate Page The page template.
return void

UpdatePagesPositions() public static method

Updates the pages positions.
public static UpdatePagesPositions ( long pageId, int orderNumber ) : void
pageId long The page id.
orderNumber int The order number.
return void

UpdateWidgetsPositions() public static method

Updates the widgets positions.
public static UpdateWidgetsPositions ( long pageWidgetId, int pageSection, int columnNumber, int orderNumber, ICorePrincipal user ) : void
pageWidgetId long The page widget id.
pageSection int
columnNumber int The column number.
orderNumber int The order number.
user ICorePrincipal The user.
return void