C# Class Rock.Model.HtmlContentService

Data access and service class for Rock.Model.HtmlContent entity objects.
Show file Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
AddCachedContent ( int blockId, string entityValue, string html, int cacheDuration ) : void

Adds the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)

FlushCachedContent ( int blockId, string entityValue ) : void

Flushes the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)

GetActiveContent ( int blockId, string entityValue ) : HtmlContent

Returns the active Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.

GetByApprovedByPersonId ( int approvedByPersonId ) : IQueryable

Returns an enumerable collection of Rock.Model.HtmlContent entity objects by their Approver Rock.Model.Person

GetByBlockId ( int blockId ) : IQueryable

Returns an enumerable collection of Rock.Model.HtmlContent entities by Rock.Model.Block (instance).

GetByBlockIdAndEntityValueAndVersion ( int blockId, string entityValue, int version ) : HtmlContent

Returns a specific Rock.Model.HtmlContent by Block, entity value and version

GetCachedContent ( int blockId, string entityValue ) : string

Returns the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)

GetContent ( int blockId, string entityValue ) : IOrderedQueryable

Returns an enumerable collection containing all versions of Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.

Private Methods

Method Description
HtmlContentCacheKey ( int blockId, string entityValue ) : string

Returns the htmlcontent cachekey for a specific blockId or, if specified, a specific entityValue (Entity Context)

Method Details

AddCachedContent() public static method

Adds the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
public static AddCachedContent ( int blockId, string entityValue, string html, int cacheDuration ) : void
blockId int The block identifier.
entityValue string The entity value.
html string The HTML.
cacheDuration int Duration of the cache.
return void

FlushCachedContent() public static method

Flushes the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
public static FlushCachedContent ( int blockId, string entityValue ) : void
blockId int The block identifier.
entityValue string The entity value.
return void

GetActiveContent() public method

Returns the active Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.
public GetActiveContent ( int blockId, string entityValue ) : HtmlContent
blockId int A that represents the Id of the .
entityValue string A representing the entityValue.
return HtmlContent

GetByApprovedByPersonId() public method

Returns an enumerable collection of Rock.Model.HtmlContent entity objects by their Approver Rock.Model.Person
public GetByApprovedByPersonId ( int approvedByPersonId ) : IQueryable
approvedByPersonId int A representing the Id of the who approved the . This /// value can be null
return IQueryable

GetByBlockId() public method

Returns an enumerable collection of Rock.Model.HtmlContent entities by Rock.Model.Block (instance).
public GetByBlockId ( int blockId ) : IQueryable
blockId int A representing the Id of the .
return IQueryable

GetByBlockIdAndEntityValueAndVersion() public method

Returns a specific Rock.Model.HtmlContent by Block, entity value and version
public GetByBlockIdAndEntityValueAndVersion ( int blockId, string entityValue, int version ) : HtmlContent
blockId int A the Id of the that the is used on.
entityValue string A representing the EntityValue (qualifier) used to customize the for a specific entity. /// This value is nullable.
version int A representing the HTMLContent's version number.
return HtmlContent

GetCachedContent() public static method

Returns the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
public static GetCachedContent ( int blockId, string entityValue ) : string
blockId int The block identifier.
entityValue string The entity value.
return string

GetContent() public method

Returns an enumerable collection containing all versions of Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.
public GetContent ( int blockId, string entityValue ) : IOrderedQueryable
blockId int A representing the Id of a .
entityValue string A representing the EntityValue. This value is nullable.
return IOrderedQueryable