C# Class Rebel.Cms.Web.RebelHelper

A utility class for use with front-end development containing many methods for accessing common APIs in Rebel
Afficher le fichier Open project: RebelCMS/rebelcmsxu5

Méthodes publiques

Méthode Description
Field ( Content currentPage, string fieldAlias, string valueAlias = "", string altFieldAlias = "", string altValueAlias = "", string altText = "", string insertBefore = "", string insertAfter = "", bool recursive = false, bool convertLineBreaks = false, bool removeParagraphTags = false, RebelRenderItemCaseType casing = RebelRenderItemCaseType.Unchanged, RebelRenderItemEncodingType encoding = RebelRenderItemEncodingType.Unchanged, string formatString = "" ) : IHtmlString
Field ( string fieldAlias, string valueAlias = "", string altFieldAlias = "", string altValueAlias = "", string altText = "", string insertBefore = "", string insertAfter = "", bool recursive = false, bool convertLineBreaks = false, bool removeParagraphTags = false, RebelRenderItemCaseType casing = RebelRenderItemCaseType.Unchanged, RebelRenderItemEncodingType encoding = RebelRenderItemEncodingType.Unchanged, string formatString = "" ) : IHtmlString
FieldKeyValues ( Content currentPage, string fieldAlias ) : object>.IDictionary

Return all key/values stored for a property

FieldKeyValues ( string fieldAlias ) : object>.IDictionary

Return all key/values stored for a property

FieldValues ( Content currentPage, string fieldAlias ) : IEnumerable

Return all values stored for a property

FieldValues ( string fieldAlias ) : IEnumerable

Return all values stored for a property

GetContentById ( HiveId id ) : Content
GetContentById ( string id ) : Content
GetDictionaryItem ( string key, string defaultValue = null ) : string
GetDictionaryItemForLanguage ( string key, string language, string defaultValue = null ) : string
GetDynamicContentById ( HiveId id, object defaultValue = null ) : dynamic
GetDynamicContentById ( string id ) : dynamic
GetEntityById ( HiveId id ) : TypedEntity

Gets the typed entity by the given id.

GetEntityById ( string id ) : TypedEntity

Gets the typed entity by the given id.

GetMediaUrl ( HiveId id ) : string

Gets the URL of the file in the first upload field found on the TypedEntity with the given id

GetMediaUrl ( HiveId id, int size ) : string

Gets the URL of the file in the first upload field found on the TypedEntity with the given id, at the specified size

GetMediaUrl ( HiveId id, string propertyAlias ) : string

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id

GetMediaUrl ( HiveId id, string propertyAlias, int size ) : string

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id, at the specified size

GetMediaUrl ( TypedEntity entity ) : string

Gets the URL of the file in the first upload field found on the given TypedEntity

GetMediaUrl ( TypedEntity entity, int size ) : string

Gets the URL of the file in the first upload field found on the given TypedEntity at the specific size

GetMediaUrl ( TypedEntity entity, string propertyAlias ) : string

Gets the URL of the file in the upload field with the given property alias on the given TypedEntity

GetMediaUrl ( TypedEntity entity, string propertyAlias, int size ) : string

Gets the URL of the file in the upload field with the given property alias on the given TypedEntity at the specific size

GetMediaUrl ( string idOrPropertyAlias ) : string

Gets the URL of the file in the first upload field found on the TypedEntity with the given id

GetMediaUrl ( string idOrPropertyAlias, int size ) : string

Gets the URL of the file in the first upload field found on the TypedEntity with the given id, at the specified size

GetMediaUrl ( string id, string propertyAlias ) : string

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id

GetMediaUrl ( string id, string propertyAlias, int size ) : string

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id, at the specified size

GetPreValueModel ( HiveId dataTypeId ) : PreValueModel

Gets the pre value model for the datatype with the specified id.

GetPreValueModel ( string dataTypeId ) : PreValueModel

Gets the pre value model for the datatype with the specified id.

GetUrl ( HiveId entityId ) : string

Gets the URL for the entity with the given id.

GetUrl ( TypedEntity entity ) : string

Gets the URL for the given entity.

GetUrl ( string entityId ) : string

Gets the URL for the entity with the given id.

RebelHelper ( ControllerContext controllerContext, IRoutableRequestContext requestContext, IRenderModelFactory modelFactory ) : System.Collections.Generic
RenderMacro ( string alias ) : IHtmlString

Renders the macro with the specified alias.

RenderMacro ( string alias, object parameters ) : IHtmlString

Renders the macro with the specified alias, passing in the specified parameters.

Truncate ( string original, int maxLength, string suffix = "..." ) : string

Method Details

Field() public méthode

public Field ( Content currentPage, string fieldAlias, string valueAlias = "", string altFieldAlias = "", string altValueAlias = "", string altText = "", string insertBefore = "", string insertAfter = "", bool recursive = false, bool convertLineBreaks = false, bool removeParagraphTags = false, RebelRenderItemCaseType casing = RebelRenderItemCaseType.Unchanged, RebelRenderItemEncodingType encoding = RebelRenderItemEncodingType.Unchanged, string formatString = "" ) : IHtmlString
currentPage Content
fieldAlias string
valueAlias string
altFieldAlias string
altValueAlias string
altText string
insertBefore string
insertAfter string
recursive bool
convertLineBreaks bool
removeParagraphTags bool
casing RebelRenderItemCaseType
encoding RebelRenderItemEncodingType
formatString string
Résultat IHtmlString

Field() public méthode

public Field ( string fieldAlias, string valueAlias = "", string altFieldAlias = "", string altValueAlias = "", string altText = "", string insertBefore = "", string insertAfter = "", bool recursive = false, bool convertLineBreaks = false, bool removeParagraphTags = false, RebelRenderItemCaseType casing = RebelRenderItemCaseType.Unchanged, RebelRenderItemEncodingType encoding = RebelRenderItemEncodingType.Unchanged, string formatString = "" ) : IHtmlString
fieldAlias string
valueAlias string
altFieldAlias string
altValueAlias string
altText string
insertBefore string
insertAfter string
recursive bool
convertLineBreaks bool
removeParagraphTags bool
casing RebelRenderItemCaseType
encoding RebelRenderItemEncodingType
formatString string
Résultat IHtmlString

FieldKeyValues() public méthode

Return all key/values stored for a property
public FieldKeyValues ( Content currentPage, string fieldAlias ) : object>.IDictionary
currentPage Content
fieldAlias string
Résultat object>.IDictionary

FieldKeyValues() public méthode

Return all key/values stored for a property
public FieldKeyValues ( string fieldAlias ) : object>.IDictionary
fieldAlias string
Résultat object>.IDictionary

FieldValues() public méthode

Return all values stored for a property
public FieldValues ( Content currentPage, string fieldAlias ) : IEnumerable
currentPage Content
fieldAlias string
Résultat IEnumerable

FieldValues() public méthode

Return all values stored for a property
public FieldValues ( string fieldAlias ) : IEnumerable
fieldAlias string
Résultat IEnumerable

GetContentById() public méthode

public GetContentById ( HiveId id ) : Content
id HiveId
Résultat Content

GetContentById() public méthode

public GetContentById ( string id ) : Content
id string
Résultat Content

GetDictionaryItem() public méthode

public GetDictionaryItem ( string key, string defaultValue = null ) : string
key string
defaultValue string
Résultat string

GetDictionaryItemForLanguage() public méthode

public GetDictionaryItemForLanguage ( string key, string language, string defaultValue = null ) : string
key string
language string
defaultValue string
Résultat string

GetDynamicContentById() public méthode

public GetDynamicContentById ( HiveId id, object defaultValue = null ) : dynamic
id HiveId
defaultValue object
Résultat dynamic

GetDynamicContentById() public méthode

public GetDynamicContentById ( string id ) : dynamic
id string
Résultat dynamic

GetEntityById() public méthode

Gets the typed entity by the given id.
public GetEntityById ( HiveId id ) : TypedEntity
id HiveId The id.
Résultat TypedEntity

GetEntityById() public méthode

Gets the typed entity by the given id.
public GetEntityById ( string id ) : TypedEntity
id string The id.
Résultat TypedEntity

GetMediaUrl() public méthode

Gets the URL of the file in the first upload field found on the TypedEntity with the given id
public GetMediaUrl ( HiveId id ) : string
id HiveId The id.
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the first upload field found on the TypedEntity with the given id, at the specified size
public GetMediaUrl ( HiveId id, int size ) : string
id HiveId The id.
size int The size (must be a prevalue on the upload property editor).
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id
public GetMediaUrl ( HiveId id, string propertyAlias ) : string
id HiveId The id.
propertyAlias string The property alias.
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id, at the specified size
public GetMediaUrl ( HiveId id, string propertyAlias, int size ) : string
id HiveId The id.
propertyAlias string The property alias.
size int The size (must be a prevalue on the upload property editor).
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the first upload field found on the given TypedEntity
public GetMediaUrl ( TypedEntity entity ) : string
entity TypedEntity The entity.
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the first upload field found on the given TypedEntity at the specific size
public GetMediaUrl ( TypedEntity entity, int size ) : string
entity TypedEntity The entity.
size int The size (must be a prevalue on the upload property editor).
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the upload field with the given property alias on the given TypedEntity
public GetMediaUrl ( TypedEntity entity, string propertyAlias ) : string
entity TypedEntity The entity.
propertyAlias string The property alias.
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the upload field with the given property alias on the given TypedEntity at the specific size
public GetMediaUrl ( TypedEntity entity, string propertyAlias, int size ) : string
entity TypedEntity The entity.
propertyAlias string The property alias.
size int The size (must be a prevalue on the upload property editor).
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the first upload field found on the TypedEntity with the given id
public GetMediaUrl ( string idOrPropertyAlias ) : string
idOrPropertyAlias string The id or property alias.
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the first upload field found on the TypedEntity with the given id, at the specified size
public GetMediaUrl ( string idOrPropertyAlias, int size ) : string
idOrPropertyAlias string The id or property alias.
size int The size (must be a prevalue on the upload property editor).
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id
public GetMediaUrl ( string id, string propertyAlias ) : string
id string The id.
propertyAlias string The property alias.
Résultat string

GetMediaUrl() public méthode

Gets the URL of the file in the upload field with the given property alias on the TypedEntity with the given id, at the specified size
public GetMediaUrl ( string id, string propertyAlias, int size ) : string
id string The id.
propertyAlias string The property alias.
size int The size (must be a prevalue on the upload property editor).
Résultat string

GetPreValueModel() public méthode

Gets the pre value model for the datatype with the specified id.
public GetPreValueModel ( HiveId dataTypeId ) : PreValueModel
dataTypeId HiveId The data type id.
Résultat PreValueModel

GetPreValueModel() public méthode

Gets the pre value model for the datatype with the specified id.
public GetPreValueModel ( string dataTypeId ) : PreValueModel
dataTypeId string The data type id.
Résultat PreValueModel

GetUrl() public méthode

Gets the URL for the entity with the given id.
public GetUrl ( HiveId entityId ) : string
entityId HiveId The entity id.
Résultat string

GetUrl() public méthode

Gets the URL for the given entity.
public GetUrl ( TypedEntity entity ) : string
entity TypedEntity The entity.
Résultat string

GetUrl() public méthode

Gets the URL for the entity with the given id.
public GetUrl ( string entityId ) : string
entityId string The entity id.
Résultat string

RebelHelper() public méthode

public RebelHelper ( ControllerContext controllerContext, IRoutableRequestContext requestContext, IRenderModelFactory modelFactory ) : System.Collections.Generic
controllerContext ControllerContext
requestContext IRoutableRequestContext
modelFactory IRenderModelFactory
Résultat System.Collections.Generic

RenderMacro() public méthode

Renders the macro with the specified alias.
public RenderMacro ( string alias ) : IHtmlString
alias string The alias.
Résultat IHtmlString

RenderMacro() public méthode

Renders the macro with the specified alias, passing in the specified parameters.
public RenderMacro ( string alias, object parameters ) : IHtmlString
alias string The alias.
parameters object The parameters.
Résultat IHtmlString

Truncate() public méthode

public Truncate ( string original, int maxLength, string suffix = "..." ) : string
original string
maxLength int
suffix string
Résultat string