C# Class Rock.Model.BlockService

The data access/service class for Rock.Model.Block entity type objects that extends the functionality of Rock.Data.Service
Mostrar archivo Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
GetByBlockTypeId ( int blockTypeId ) : IQueryable

Returns an enumerable collection of Rock.Model.Block">Blocks that implement a specific

GetByLayout ( int layoutId ) : IQueryable

Returns an enumerable collection of Rock.Model.Block">Blocks that are implemented as part of a

GetByLayoutAndZone ( int layoutId, string zone ) : IQueryable

Returns an enumerable collection of Blocks that are implemented in a specific zone on a Site Layout template.

GetByPage ( int pageId ) : IQueryable

Returns a collection of Blocks that are implemented on a specific page.

GetByPageAndZone ( int pageId, string zone ) : IQueryable

Returns a collection of Blocks that are implemented in a Zone on a specific page.

GetGuid ( int id ) : Guid?

Gets the Guid for the Block that has the specified Id

GetMaxOrder ( Block block ) : int

Returns the next available position for a Rock.Model.Block in a given Zone.

Method Details

GetByBlockTypeId() public method

Returns an enumerable collection of Rock.Model.Block">Blocks that implement a specific
public GetByBlockTypeId ( int blockTypeId ) : IQueryable
blockTypeId int The Id of the to search for.
return IQueryable

GetByLayout() public method

Returns an enumerable collection of Rock.Model.Block">Blocks that are implemented as part of a
public GetByLayout ( int layoutId ) : IQueryable
layoutId int An representing the Id of the that the block belongs to.
return IQueryable

GetByLayoutAndZone() public method

Returns an enumerable collection of Blocks that are implemented in a specific zone on a Site Layout template.
public GetByLayoutAndZone ( int layoutId, string zone ) : IQueryable
layoutId int An representing the Id of the that the block belongs to.
zone string A representing the name of the Zone to search by.
return IQueryable

GetByPage() public method

Returns a collection of Blocks that are implemented on a specific page.
public GetByPage ( int pageId ) : IQueryable
pageId int An representing the Id of a that a may be implemented on.
return IQueryable

GetByPageAndZone() public method

Returns a collection of Blocks that are implemented in a Zone on a specific page.
public GetByPageAndZone ( int pageId, string zone ) : IQueryable
pageId int An that represents the Id of that a may be implemented on.
zone string A that represents the name of a page/layout zone that a may be implemented on.
return IQueryable

GetGuid() public method

Gets the Guid for the Block that has the specified Id
public GetGuid ( int id ) : Guid?
id int The identifier.
return Guid?

GetMaxOrder() public method

Returns the next available position for a Rock.Model.Block in a given Zone.
public GetMaxOrder ( Block block ) : int
block Block A entity object.
return int