C# 클래스 Sdl.Web.Tridion.Common.TemplateBase

Base class for common functionality used by TBBs
상속: ITemplate
파일 보기 프로젝트 열기: sdl/dxa-content-management

공개 메소드들

메소드 설명
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