C# 클래스 Rock.Web.UI.RockPage

RockPage is the base abstract class that all page templates in Rock should inherit from
상속: System.Web.UI.Page
파일 보기 프로젝트 열기: SparkDevNetwork/Rock 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
UserName string

Private Properties

프로퍼티 타입 설명
AddBlockMove void
AddGoogleAnalytics void
AddPopupControls void
AddTriggerPanel void
AddZoneElements void
GetCookieContext void
HtmlLinkExists bool
HtmlMetaExists bool
OnBlockUpdated void
SaveContextItem void
SetPage void

공개 메소드들

메소드 설명
AddCSSLink ( Page page, string href, bool fingerprint = true ) : void

Adds a new CSS link that will be added to the page header prior to the page being rendered

AddCSSLink ( Page page, string href, string mediaType, bool fingerprint = true ) : void

Adds the CSS link to the page

AddCSSLink ( string href, bool fingerprint = true ) : void

Adds a new CSS link that will be added to the page header prior to the page being rendered

AddCSSLink ( string href, string mediaType, bool fingerprint = true ) : void

Adds the CSS link to the page

AddConfigurationUpdateTrigger ( UpdatePanel updatePanel ) : void

Adds an update trigger for when the block instance properties are updated.

AddHistory ( string key, string state, string title = "" ) : void

Adds a history point to the ScriptManager. Note: ScriptManager's EnableHistory property must be set to True

AddHtmlLink ( System.Web.UI.HtmlControls.HtmlLink htmlLink ) : void

Adds a new Html link that will be added to the page header prior to the page being rendered.

AddHtmlLink ( Page page, System.Web.UI.HtmlControls.HtmlLink htmlLink, string contentPlaceHolderId = "" ) : void

Adds a new Html link that will be added to the page header prior to the page being rendered

AddMetaTag ( System.Web.UI.HtmlControls.HtmlMeta htmlMeta ) : void

Adds a meta tag to the page header prior to the page being rendered

AddMetaTag ( Page page, System.Web.UI.HtmlControls.HtmlMeta htmlMeta ) : void

Adds a meta tag to the page

AddScriptLink ( Page page, string path, bool fingerprint = true ) : void

Adds a new script tag to the page header prior to the page being rendered

AddScriptLink ( string path, bool fingerprint = true ) : void

Adds a new script tag to the page header prior to the page being rendered.

AddScriptToHead ( Page page, string script, bool AddScriptTags ) : void

Adds the script to head.

DeleteUserPreference ( string key ) : void

Deletes a user preference value for the specified key

GetAttributeValue ( string key ) : string

Returns the current page's first value for the selected attribute If the attribute doesn't exist, null is returned

GetAttributeValues ( string key ) : List

Returns the current page's values for the selected attribute. If the attribute doesn't exist an empty list is returned.

GetClientIpAddress ( ) : string

Gets the client's ip address.

GetContextCookieName ( bool pageSpecific ) : string

Gets the name of the context cookie.

GetContextEntityTypes ( ) : List

Gets the context entity types.

GetCurrentContext ( Rock.Web.Cache.EntityTypeCache entity ) : Rock.Data.IEntity

Gets the current context object for a given entity type.

GetSharedItem ( string key ) : object

Retrieves an item from the current HTTPRequest items collection. This is useful to retrieve an object that was saved by a previous block on the same page.

GetUserPreference ( string key ) : string

Returns a user preference for the current user and given key.

GetUserPreferences ( string keyPrefix ) : string>.Dictionary

Returns the preference values for the current user that start with a given key.

HideSecondaryBlocks ( Rock.Web.UI.RockBlock caller, bool hidden ) : void

Hides any secondary blocks.

LoadGoogleMapsApi ( ) : void

Adds the google maps javascript API to the page

LogException ( Exception ex ) : void

Logs the exception.

PageParameter ( Rock.Web.UI.PageReference pageReference, string name ) : string

Checks the page reference's parms and querystring for a parameter matching the specified name, and if found returns the string

PageParameter ( string name, bool searchFormParams = false ) : string

Checks the page's RouteData values and then the query string for a parameter matching the specified name, and if found returns the string value

PageParameters ( ) : object>.Dictionary

Gets the page route and query string parameters

ResolveRockUrl ( string url ) : string

Returns a resolved Rock URL. Similar to System.Web.UI.Control's ResolveUrl method except that you can prefix a url with '~~' to indicate a virtual path to Rock's current theme root folder.

ResolveRockUrl ( string url, bool fingerprint ) : string

Resolves the rock URL.

ResolveRockUrlIncludeRoot ( string url ) : string

Resolves the rock URL and includes root.

SaveSharedItem ( string key, object item ) : void

Used to save an item to the current HTTPRequests items collection. This is useful if multiple blocks on the same page will need access to the same object. The first block can read the object and save it using this method for the other blocks to reference

SaveUserPreferences ( string keyPrefix ) : void

Saves the user preferences.

SessionUserPreferences ( ) : string>.Dictionary

Returns the current user's preferences, if they have previously been loaded into the session, they will be retrieved from there, otherwise they will be retrieved from the database, added to session and then returned

SetContextCookie ( IEntity entity, bool pageSpecific = false, bool refreshPage = true ) : void

Sets the context cookie.

SetUserPreference ( string key, string value, bool saveValue = true ) : void

Sets a user preference value for the specified key. If the key already exists, the value will be updated, if it is a new key it will be added. Value is then optionally saved to database.

UpdateBlocks ( string blockTypePath ) : void

Updates the blocks.

보호된 메소드들

메소드 설명
FindRockControls ( System.Web.UI.ControlCollection controls ) : void

Recurses the page's System.Web.UI.ControlCollection looking for any Rock.Web.UI.Controls.Zone controls

FindZone ( string zoneName ) : Control

Find the Rock.Web.UI.Controls.Zone for the specified zone name. Looks in the Zones property to see if it has been defined. If an existing zone Rock.Web.UI.Controls.Zone cannot be found, the HtmlForm control is returned

InitializeCulture ( ) : void

Initializes the page's culture to use the culture specified by the browser ("auto")

OnInit ( EventArgs e ) : void

Loads all of the configured blocks for the current page into the control tree

OnLoad ( EventArgs e ) : void

Raises the E:System.Web.UI.Control.Load event.

OnSaveStateComplete ( EventArgs e ) : void

Raises the E:System.Web.UI.Page.SaveStateComplete event after the page state has been saved to the persistence medium.

scriptManager_Navigate ( object sender, System.Web.UI.HistoryEventArgs e ) : void

Handles the Navigate event of the scriptManager control.

trigger_Click ( object sender, EventArgs e ) : void

Handles the Click event of the trigger control.

비공개 메소드들

메소드 설명
AddBlockMove ( ) : void

Adds a control to move the block to another zone on the page.

AddGoogleAnalytics ( string code ) : void

Adds the google analytics script

AddPopupControls ( ) : void

Adds the popup controls.

AddTriggerPanel ( ) : void

Adds the config elements.

AddZoneElements ( bool canConfigPage ) : void

Adds the config elements.

GetCookieContext ( string cookieName ) : void
HtmlLinkExists ( Control parentControl, System.Web.UI.HtmlControls.HtmlLink newLink ) : bool

Returns a System.Boolean flag indicating if a specified parent control contains the specified HtmlLink.

HtmlMetaExists ( Page page, System.Web.UI.HtmlControls.HtmlMeta newMeta ) : bool

Returns a flag indicating if a meta tag exists on the page.

OnBlockUpdated ( int blockId ) : void

Called when a block's properties are updated.

SaveContextItem ( string key, object item ) : void
SetPage ( PageCache pageCache ) : void

Sets the page.

메소드 상세

AddCSSLink() 공개 정적인 메소드

Adds a new CSS link that will be added to the page header prior to the page being rendered
public static AddCSSLink ( Page page, string href, bool fingerprint = true ) : void
page System.Web.UI.Page The .
href string A representing the path to css file. Should be relative to layout template. Will be resolved at runtime
fingerprint bool if set to true [fingerprint].
리턴 void

AddCSSLink() 공개 정적인 메소드

Adds the CSS link to the page
public static AddCSSLink ( Page page, string href, string mediaType, bool fingerprint = true ) : void
page System.Web.UI.Page The .
href string A representing the path to css file. Should be relative to layout template. Will be resolved at runtime
mediaType string A representing the type of the media to use for the css link.
fingerprint bool if set to true [fingerprint].
리턴 void

AddCSSLink() 공개 메소드

Adds a new CSS link that will be added to the page header prior to the page being rendered
public AddCSSLink ( string href, bool fingerprint = true ) : void
href string A representing the path to css file. Should be relative to layout template. Will be resolved at runtime.
fingerprint bool if set to true [fingerprint].
리턴 void

AddCSSLink() 공개 메소드

Adds the CSS link to the page
public AddCSSLink ( string href, string mediaType, bool fingerprint = true ) : void
href string A representing the path to css file. Should be relative to layout template. Will be resolved at runtime
mediaType string A representing the type of the media to use for the css link.
fingerprint bool if set to true [fingerprint].
리턴 void

AddConfigurationUpdateTrigger() 공개 메소드

Adds an update trigger for when the block instance properties are updated.
public AddConfigurationUpdateTrigger ( UpdatePanel updatePanel ) : void
updatePanel System.Web.UI.UpdatePanel The to add the to.
리턴 void

AddHistory() 공개 메소드

Adds a history point to the ScriptManager. Note: ScriptManager's EnableHistory property must be set to True
public AddHistory ( string key, string state, string title = "" ) : void
key string A representing the key to use for the history point.
state string A representing any state information to store for the history point.
title string A representing the title to be used by the browser, will use an empty string by default.
리턴 void

AddHtmlLink() 공개 메소드

Adds a new Html link that will be added to the page header prior to the page being rendered.
public AddHtmlLink ( System.Web.UI.HtmlControls.HtmlLink htmlLink ) : void
htmlLink System.Web.UI.HtmlControls.HtmlLink The .
리턴 void

AddHtmlLink() 공개 정적인 메소드

Adds a new Html link that will be added to the page header prior to the page being rendered
public static AddHtmlLink ( Page page, System.Web.UI.HtmlControls.HtmlLink htmlLink, string contentPlaceHolderId = "" ) : void
page System.Web.UI.Page The .
htmlLink System.Web.UI.HtmlControls.HtmlLink The to add to the page.
contentPlaceHolderId string A representing the Id of the content placeholder to add the link to.
리턴 void

AddMetaTag() 공개 메소드

Adds a meta tag to the page header prior to the page being rendered
public AddMetaTag ( System.Web.UI.HtmlControls.HtmlMeta htmlMeta ) : void
htmlMeta System.Web.UI.HtmlControls.HtmlMeta The tag.
리턴 void

AddMetaTag() 공개 정적인 메소드

Adds a meta tag to the page
public static AddMetaTag ( Page page, System.Web.UI.HtmlControls.HtmlMeta htmlMeta ) : void
page System.Web.UI.Page The .
htmlMeta System.Web.UI.HtmlControls.HtmlMeta A representing the HTML meta tag.
리턴 void

AddScriptLink() 공개 정적인 메소드

Adds a new script tag to the page header prior to the page being rendered
public static AddScriptLink ( Page page, string path, bool fingerprint = true ) : void
page System.Web.UI.Page The .
path string A representing the path to script file. Should be relative to layout template. Will be resolved at runtime.
fingerprint bool if set to true [fingerprint].
리턴 void

AddScriptLink() 공개 메소드

Adds a new script tag to the page header prior to the page being rendered.
public AddScriptLink ( string path, bool fingerprint = true ) : void
path string A representing the path to the script link.
fingerprint bool if set to true [fingerprint].
리턴 void

AddScriptToHead() 공개 정적인 메소드

Adds the script to head.
public static AddScriptToHead ( Page page, string script, bool AddScriptTags ) : void
page System.Web.UI.Page The page.
script string The script.
AddScriptTags bool if set to true [add script tags].
리턴 void

DeleteUserPreference() 공개 메소드

Deletes a user preference value for the specified key
public DeleteUserPreference ( string key ) : void
key string A representing the name of the key.
리턴 void

FindRockControls() 보호된 메소드

Recurses the page's System.Web.UI.ControlCollection looking for any Rock.Web.UI.Controls.Zone controls
protected FindRockControls ( System.Web.UI.ControlCollection controls ) : void
controls System.Web.UI.ControlCollection A containing the page's controls.
리턴 void

FindZone() 보호된 메소드

Find the Rock.Web.UI.Controls.Zone for the specified zone name. Looks in the Zones property to see if it has been defined. If an existing zone Rock.Web.UI.Controls.Zone cannot be found, the HtmlForm control is returned
protected FindZone ( string zoneName ) : Control
zoneName string A representing the name of the zone.
리턴 System.Web.UI.Control

GetAttributeValue() 공개 메소드

Returns the current page's first value for the selected attribute If the attribute doesn't exist, null is returned
public GetAttributeValue ( string key ) : string
key string A representing the argument key.
리턴 string

GetAttributeValues() 공개 메소드

Returns the current page's values for the selected attribute. If the attribute doesn't exist an empty list is returned.
public GetAttributeValues ( string key ) : List
key string A representing the key of the selected attribute ///
리턴 List

GetClientIpAddress() 공개 정적인 메소드

Gets the client's ip address.
public static GetClientIpAddress ( ) : string
리턴 string

GetContextCookieName() 공개 메소드

Gets the name of the context cookie.
public GetContextCookieName ( bool pageSpecific ) : string
pageSpecific bool if set to true [page specific].
리턴 string

GetContextEntityTypes() 공개 메소드

Gets the context entity types.
public GetContextEntityTypes ( ) : List
리턴 List

GetCurrentContext() 공개 메소드

Gets the current context object for a given entity type.
public GetCurrentContext ( Rock.Web.Cache.EntityTypeCache entity ) : Rock.Data.IEntity
entity Rock.Web.Cache.EntityTypeCache The containing a reference to the entity.
리턴 Rock.Data.IEntity

GetSharedItem() 공개 메소드

Retrieves an item from the current HTTPRequest items collection. This is useful to retrieve an object that was saved by a previous block on the same page.
public GetSharedItem ( string key ) : object
key string A representing the object's key value.
리턴 object

GetUserPreference() 공개 메소드

Returns a user preference for the current user and given key.
public GetUserPreference ( string key ) : string
key string A representing the key to the user preference.
리턴 string

GetUserPreferences() 공개 메소드

Returns the preference values for the current user that start with a given key.
public GetUserPreferences ( string keyPrefix ) : string>.Dictionary
keyPrefix string A representing the key prefix. Preference values, for the current user, with a key that begins with this value will be included.
리턴 string>.Dictionary

HideSecondaryBlocks() 공개 메소드

Hides any secondary blocks.
public HideSecondaryBlocks ( Rock.Web.UI.RockBlock caller, bool hidden ) : void
caller Rock.Web.UI.RockBlock The that is the caller
hidden bool A value that signifies if secondary blocks should be hidden.
리턴 void

InitializeCulture() 보호된 메소드

Initializes the page's culture to use the culture specified by the browser ("auto")
protected InitializeCulture ( ) : void
리턴 void

LoadGoogleMapsApi() 공개 메소드

Adds the google maps javascript API to the page
public LoadGoogleMapsApi ( ) : void
리턴 void

LogException() 공개 메소드

Logs the exception.
public LogException ( Exception ex ) : void
ex System.Exception The to log.
리턴 void

OnInit() 보호된 메소드

Loads all of the configured blocks for the current page into the control tree
protected OnInit ( EventArgs e ) : void
e System.EventArgs
리턴 void

OnLoad() 보호된 메소드

Raises the E:System.Web.UI.Control.Load event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs The object that contains the event data.
리턴 void

OnSaveStateComplete() 보호된 메소드

Raises the E:System.Web.UI.Page.SaveStateComplete event after the page state has been saved to the persistence medium.
protected OnSaveStateComplete ( EventArgs e ) : void
e System.EventArgs A object containing the event data.
리턴 void

PageParameter() 공개 메소드

Checks the page reference's parms and querystring for a parameter matching the specified name, and if found returns the string
public PageParameter ( Rock.Web.UI.PageReference pageReference, string name ) : string
pageReference Rock.Web.UI.PageReference The .
name string A containing the name of the parameter.
리턴 string

PageParameter() 공개 메소드

Checks the page's RouteData values and then the query string for a parameter matching the specified name, and if found returns the string value
public PageParameter ( string name, bool searchFormParams = false ) : string
name string A representing the name of the page parameter.
searchFormParams bool if set to true [search form parameters].
리턴 string

PageParameters() 공개 메소드

Gets the page route and query string parameters
public PageParameters ( ) : object>.Dictionary
리턴 object>.Dictionary

ResolveRockUrl() 공개 메소드

Returns a resolved Rock URL. Similar to System.Web.UI.Control's ResolveUrl method except that you can prefix a url with '~~' to indicate a virtual path to Rock's current theme root folder.
public ResolveRockUrl ( string url ) : string
url string A representing the URL to resolve.
리턴 string

ResolveRockUrl() 공개 메소드

Resolves the rock URL.
public ResolveRockUrl ( string url, bool fingerprint ) : string
url string The URL.
fingerprint bool if set to true [fingerprint].
리턴 string

ResolveRockUrlIncludeRoot() 공개 메소드

Resolves the rock URL and includes root.
public ResolveRockUrlIncludeRoot ( string url ) : string
url string The URL.
리턴 string

SaveSharedItem() 공개 메소드

Used to save an item to the current HTTPRequests items collection. This is useful if multiple blocks on the same page will need access to the same object. The first block can read the object and save it using this method for the other blocks to reference
public SaveSharedItem ( string key, object item ) : void
key string A representing the item's key
item object The to save.
리턴 void

SaveUserPreferences() 공개 메소드

Saves the user preferences.
public SaveUserPreferences ( string keyPrefix ) : void
keyPrefix string The key prefix.
리턴 void

SessionUserPreferences() 공개 메소드

Returns the current user's preferences, if they have previously been loaded into the session, they will be retrieved from there, otherwise they will be retrieved from the database, added to session and then returned
public SessionUserPreferences ( ) : string>.Dictionary
리턴 string>.Dictionary

SetContextCookie() 공개 메소드

Sets the context cookie.
public SetContextCookie ( IEntity entity, bool pageSpecific = false, bool refreshPage = true ) : void
entity IEntity The entity.
pageSpecific bool if set to true [page specific].
refreshPage bool if set to true [refresh page].
리턴 void

SetUserPreference() 공개 메소드

Sets a user preference value for the specified key. If the key already exists, the value will be updated, if it is a new key it will be added. Value is then optionally saved to database.
public SetUserPreference ( string key, string value, bool saveValue = true ) : void
key string A representing the name of the key.
value string A representing the preference value.
saveValue bool if set to true [save value].
리턴 void

UpdateBlocks() 공개 메소드

Updates the blocks.
public UpdateBlocks ( string blockTypePath ) : void
blockTypePath string The block type path.
리턴 void

scriptManager_Navigate() 보호된 메소드

Handles the Navigate event of the scriptManager control.
protected scriptManager_Navigate ( object sender, System.Web.UI.HistoryEventArgs e ) : void
sender object The source of the event.
e System.Web.UI.HistoryEventArgs The instance containing the event data.
리턴 void

trigger_Click() 보호된 메소드

Handles the Click event of the trigger control.
protected trigger_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
리턴 void

프로퍼티 상세

UserName 보호되어 있는 프로퍼티

The full name of the currently logged in user
protected string UserName
리턴 string