C# 클래스 Rock.Model.PageService

Data access and service class for the Rock.Model.Page model object. This class inherits from the Service class.
파일 보기 프로젝트 열기: SparkDevNetwork/Rock 1 사용 예제들

공개 메소드들

메소드 설명
CanDelete ( Page item, string &errorMessage, bool includeSecondLvl ) : bool

Determines whether the specified page can be deleted. Performs some additional checks that are missing from the auto-generated PageService.CanDelete().

CopyPage ( int pageId, int currentPersonAliasId = null ) : Guid?

Copies the page.

GetAllDescendents ( int parentPageId ) : IEnumerable

Returns an enumerable collection of Rock.Model.Page">Pages that are descendants of a

GetByLayoutId ( int layoutId ) : IOrderedQueryable

Gets an enumerable collection of Rock.Model.Page entities associated with a Rock.Model.Layout.

GetByParentPageId ( int parentPageId, string includes = null ) : IOrderedQueryable

Gets an enumerable collection of Rock.Model.Page entities by the parent Page's Id.

GetBySiteId ( int siteId ) : IOrderedQueryable

Gets an enumerable collection of Rock.Model.Page entities associated with a Rock.Model.Site.

GetGuid ( int id ) : Guid?

Gets the Guid for the Page that has the specified Id

비공개 메소드들

메소드 설명
CloneHtmlContent ( Guid>.Dictionary blockGuidDictionary, RockContext rockContext, int currentPersonAliasId = null ) : void

Copies any HtmlContent in the original page tree over to the corresponding blocks on the copied page tree.

GenerateBlockAttributeValues ( Guid>.Dictionary pageGuidDictionary, Guid>.Dictionary blockGuidDictionary, RockContext rockContext, int currentPersonAliasId = null ) : void

This method takes the attribute values of the original blocks, and creates copies of them that point to the copied blocks. In addition, any block attribute value pointing to a page in the original page tree is now updated to point to the corresponding page in the copied page tree.

GeneratePageBlockAuths ( Guid>.Dictionary pageGuidDictionary, Guid>.Dictionary blockGuidDictionary, RockContext rockContext, int currentPersonAliasId = null ) : void

Copies any auths for the original pages and blocks over to the copied pages and blocks.

GeneratePageCopy ( Rock sourcePage, Guid>.Dictionary pageGuidDictionary, Guid>.Dictionary blockGuidDictionary, int currentPersonAliasId = null ) : Rock.Model.Page

This method generates a copy of the given page along with any descendant pages, as well as any blocks on any of those pages.

메소드 상세

CanDelete() 공개 메소드

Determines whether the specified page can be deleted. Performs some additional checks that are missing from the auto-generated PageService.CanDelete().
public CanDelete ( Page item, string &errorMessage, bool includeSecondLvl ) : bool
item Page The item.
errorMessage string The error message.
includeSecondLvl bool If set to true, verifies that the item is not referenced by any second level relationships.
리턴 bool

CopyPage() 공개 메소드

Copies the page.
public CopyPage ( int pageId, int currentPersonAliasId = null ) : Guid?
pageId int The page identifier.
currentPersonAliasId int The current person alias identifier.
리턴 Guid?

GetAllDescendents() 공개 메소드

Returns an enumerable collection of Rock.Model.Page">Pages that are descendants of a
public GetAllDescendents ( int parentPageId ) : IEnumerable
parentPageId int A representing the Id of the
리턴 IEnumerable

GetByLayoutId() 공개 메소드

Gets an enumerable collection of Rock.Model.Page entities associated with a Rock.Model.Layout.
public GetByLayoutId ( int layoutId ) : IOrderedQueryable
layoutId int The layout id.
리턴 IOrderedQueryable

GetByParentPageId() 공개 메소드

Gets an enumerable collection of Rock.Model.Page entities by the parent Page's Id.
public GetByParentPageId ( int parentPageId, string includes = null ) : IOrderedQueryable
parentPageId int The Id of the Parent to search by.
includes string The includes.
리턴 IOrderedQueryable

GetBySiteId() 공개 메소드

Gets an enumerable collection of Rock.Model.Page entities associated with a Rock.Model.Site.
public GetBySiteId ( int siteId ) : IOrderedQueryable
siteId int The site id.
리턴 IOrderedQueryable

GetGuid() 공개 메소드

Gets the Guid for the Page that has the specified Id
public GetGuid ( int id ) : Guid?
id int The identifier.
리턴 Guid?