C# Класс Sdl.Web.Tridion.Common.TemplateBase

Base class for common functionality used by TBBs
Наследование: ITemplate
Показать файл Открыть проект

Открытые методы

Метод Описание
GetComponent ( ) : Component

Returns the component object that is defined in the package for this template.

This method should only be called when there is an actual Component item in the package. It does not currently handle the situation where no such item is available.

GetPage ( ) : Page

Returns the Page object that is defined in the package for this template.

IsPageTemplate ( ) : bool

True if the rendering context is a page, rather than component

Transform ( Engine engine, Package package ) : void

Защищенные методы

Метод Описание
AddBootstrapJsonBinary ( IList binaries, Component relatedComponent, StructureGroup sg, string variantName ) : void
AddJsonBinary ( object objectToSerialize, Component relatedComponent, StructureGroup structureGroup, string name, string variantId = null ) : Binary
ExtractKeyValuePairs ( Component component ) : string>.Dictionary
GetActiveModules ( ) : Component>.Dictionary
GetChildOrganizationalItem ( OrganizationalItem root, string title ) : OrganizationalItem
GetComponentTemplate ( ) : ComponentTemplate

Returns the Template from the resolved item if it's a Component Template

GetOrganizationalItemContents ( OrganizationalItem orgItem, ItemType itemType, bool recursive ) : string>>.List
GetPublication ( ) : Publication

Gets the context Publication.

GetRegionName ( ComponentTemplate template ) : string
GetSystemStructureGroup ( string subStructureGroupTitle = null ) : StructureGroup
GetUsingItems ( RepositoryLocalObject subject, ItemType itemType ) : string>>.List
Initialize ( Engine engine, Package package ) : void

Initializes the engine and package to use in this TemplateBase object.

IsMasterWebPublication ( Publication publication ) : bool
IsPreviewMode ( ) : bool
JsonSerialize ( object objectToSerialize ) : string
MergeData ( string>.Dictionary source, string>.Dictionary mergeData ) : string>.Dictionary
OutputSummary ( string name, IEnumerable files ) : void

Update the (JSON) summary in the Output item.

PutContextComponentOnTop ( ) : void

Put the context component back on top of the package stack As some TBBs (like SiteEdit ones) rely on this being the first Component in the stack

XmlElementToTcmUriList ( XmlElement data ) : string>>.List

Приватные методы

Метод Описание
CheckInitialized ( ) : void
GetActiveModules ( Component coreConfigComponent ) : Component>.Dictionary
GetModuleConfigSchema ( ) : Schema
GetModuleNameFromItem ( RepositoryLocalObject item, string moduleRoot ) : string
IsPublishingToStaging ( ) : bool
JsonEncode ( object json ) : string
PublishBootstrapJson ( List filesCreated, Component relatedComponent, StructureGroup sg, string variantName = null, List additionalData = null ) : string
PublishJson ( string json, Component relatedComponent, StructureGroup sg, string filename, string variantName ) : string
PublishJsonData ( Dictionary settings, Component relatedComponent, string variantName, StructureGroup sg, bool isArray = false ) : List
PublishJsonData ( string>.Dictionary data, Component relatedComponent, string filename, string variantName, StructureGroup sg, bool isArray = false ) : string
PublishJsonData ( List settings, Component relatedComponent, string filename, string variantName, StructureGroup sg, bool isArray = false ) : string
StripModuleFromName ( string name ) : string

Описание методов

AddBootstrapJsonBinary() защищенный Метод

protected AddBootstrapJsonBinary ( IList binaries, Component relatedComponent, StructureGroup sg, string variantName ) : void
binaries IList
relatedComponent Component
sg StructureGroup
variantName string
Результат void

AddJsonBinary() защищенный Метод

protected AddJsonBinary ( object objectToSerialize, Component relatedComponent, StructureGroup structureGroup, string name, string variantId = null ) : Binary
objectToSerialize object
relatedComponent Component
structureGroup StructureGroup
name string
variantId string
Результат Binary

ExtractKeyValuePairs() защищенный Метод

protected ExtractKeyValuePairs ( Component component ) : string>.Dictionary
component Component
Результат string>.Dictionary

GetActiveModules() защищенный Метод

protected GetActiveModules ( ) : Component>.Dictionary
Результат Component>.Dictionary

GetChildOrganizationalItem() защищенный Метод

protected GetChildOrganizationalItem ( OrganizationalItem root, string title ) : OrganizationalItem
root OrganizationalItem
title string
Результат OrganizationalItem

GetComponent() публичный Метод

Returns the component object that is defined in the package for this template.
This method should only be called when there is an actual Component item in the package. It does not currently handle the situation where no such item is available.
public GetComponent ( ) : Component
Результат Component

GetComponentTemplate() защищенный Метод

Returns the Template from the resolved item if it's a Component Template
protected GetComponentTemplate ( ) : ComponentTemplate
Результат ComponentTemplate

GetOrganizationalItemContents() защищенный Метод

protected GetOrganizationalItemContents ( OrganizationalItem orgItem, ItemType itemType, bool recursive ) : string>>.List
orgItem OrganizationalItem
itemType ItemType
recursive bool
Результат string>>.List

GetPage() публичный Метод

Returns the Page object that is defined in the package for this template.
public GetPage ( ) : Page
Результат Page

GetPublication() защищенный Метод

Gets the context Publication.
protected GetPublication ( ) : Publication
Результат Publication

GetRegionName() защищенный статический Метод

protected static GetRegionName ( ComponentTemplate template ) : string
template ComponentTemplate
Результат string

GetSystemStructureGroup() защищенный Метод

protected GetSystemStructureGroup ( string subStructureGroupTitle = null ) : StructureGroup
subStructureGroupTitle string
Результат StructureGroup

GetUsingItems() защищенный Метод

protected GetUsingItems ( RepositoryLocalObject subject, ItemType itemType ) : string>>.List
subject RepositoryLocalObject
itemType ItemType
Результат string>>.List

Initialize() защищенный Метод

Initializes the engine and package to use in this TemplateBase object.
protected Initialize ( Engine engine, Package package ) : void
engine Engine The engine to use in calls to the other methods of this TemplateBase object
package Package The package to use in calls to the other methods of this TemplateBase object
Результат void

IsMasterWebPublication() защищенный Метод

protected IsMasterWebPublication ( Publication publication ) : bool
publication Publication
Результат bool

IsPageTemplate() публичный Метод

True if the rendering context is a page, rather than component
public IsPageTemplate ( ) : bool
Результат bool

IsPreviewMode() защищенный Метод

protected IsPreviewMode ( ) : bool
Результат bool

JsonSerialize() защищенный Метод

protected JsonSerialize ( object objectToSerialize ) : string
objectToSerialize object
Результат string

MergeData() защищенный Метод

protected MergeData ( string>.Dictionary source, string>.Dictionary mergeData ) : string>.Dictionary
source string>.Dictionary
mergeData string>.Dictionary
Результат string>.Dictionary

OutputSummary() защищенный Метод

Update the (JSON) summary in the Output item.
protected OutputSummary ( string name, IEnumerable files ) : void
name string The name of the Template.
files IEnumerable The files/binaries created by the Template.
Результат void

PutContextComponentOnTop() защищенный Метод

Put the context component back on top of the package stack As some TBBs (like SiteEdit ones) rely on this being the first Component in the stack
protected PutContextComponentOnTop ( ) : void
Результат void

Transform() публичный абстрактный Метод

public abstract Transform ( Engine engine, Package package ) : void
engine Engine
package Package
Результат void

XmlElementToTcmUriList() защищенный Метод

protected XmlElementToTcmUriList ( XmlElement data ) : string>>.List
data System.Xml.XmlElement
Результат string>>.List