C# 클래스 Sitecore.SharedSource.Commons.Extensions.ItemExtensions

custom extension methods
파일 보기 프로젝트 열기: Velir/Sitecore-Commons

공개 메소드들

메소드 설명
GetAncestor ( this item, List templateIds ) : System.Item

Crawls up the tree until one of the passed templates are found and return that item.

GetAncestor ( this item, List templateIds, bool deepInheritance ) : System.Item

Gets the ancestor. Recurses along the inheritance of an items template. This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimized its value

GetAncestor ( this item, List templateIds, int inheritanceDepth ) : System.Item

Gets the ancestor. Recurses along the inheritance of an items template.

GetAncestor ( this item, List templateIds, int inheritanceDepth, bool nodeUp ) : System.Item

Gets the ancestor. Recurses along the inheritance of an items template.

GetAncestor ( this item, string templateId ) : System.Item

Crawls up the tree until the template is found

GetAncestor ( this item, string templateId, bool deepInheritance ) : System.Item

Gets the ancestor. Recurses along the inheritance of an items template. This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value

GetAncestor ( this item, string templateId, int inheritanceDepth ) : System.Item

Crawls up the tree until the template is found. Recurses along the inheritance of an items template.

GetRelatedItems ( this item ) : IEnumerable

Gets a list of items linked to in fields of the item it is called on.

IsMediaItem ( this item ) : bool

Check against the item to see if it a media item

IsNotNull ( this item ) : bool

Checks to see if an item is not null

IsNull ( this item ) : bool

Checks to see if an item is null

IsOfTemplate ( this item, string templateId ) : bool

check to verify that the item is of passed template

IsOfTemplate ( this item, string templateId, bool deep ) : bool

Will check the item's template, if deep is enabled it will check item's base templates This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value

IsOfTemplate ( this item, string templateId, int depth ) : bool

Will check the item's template, if depth is non-zero it will recurse down the item's base templates

SerializeItem ( this item, string folderPath ) : void

Serialize Item to an xml file

비공개 메소드들

메소드 설명
IsTemplateOfTemplate ( this item, string templateId, int depth ) : bool

Will check the item's template, if depth is non-zero it will recurse down the item's base templates

메소드 상세

GetAncestor() 공개 정적인 메소드

Crawls up the tree until one of the passed templates are found and return that item.
public static GetAncestor ( this item, List templateIds ) : System.Item
item this
templateIds List
리턴 System.Item

GetAncestor() 공개 정적인 메소드

Gets the ancestor. Recurses along the inheritance of an items template. This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimized its value
public static GetAncestor ( this item, List templateIds, bool deepInheritance ) : System.Item
item this The item.
templateIds List The template ids.
deepInheritance bool if set to true [deep inheritance].
리턴 System.Item

GetAncestor() 공개 정적인 메소드

Gets the ancestor. Recurses along the inheritance of an items template.
public static GetAncestor ( this item, List templateIds, int inheritanceDepth ) : System.Item
item this The item.
templateIds List The template ids.
inheritanceDepth int The inheritance depth.
리턴 System.Item

GetAncestor() 공개 정적인 메소드

Gets the ancestor. Recurses along the inheritance of an items template.
public static GetAncestor ( this item, List templateIds, int inheritanceDepth, bool nodeUp ) : System.Item
item this The item.
templateIds List The template ids.
inheritanceDepth int The inheritance depth.
nodeUp bool Bottom up ot top down search
리턴 System.Item

GetAncestor() 공개 정적인 메소드

Crawls up the tree until the template is found
public static GetAncestor ( this item, string templateId ) : System.Item
item this
templateId string
리턴 System.Item

GetAncestor() 공개 정적인 메소드

Gets the ancestor. Recurses along the inheritance of an items template. This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value
public static GetAncestor ( this item, string templateId, bool deepInheritance ) : System.Item
item this The item.
templateId string The template id.
deepInheritance bool if set to true [deep inheritance].
리턴 System.Item

GetAncestor() 공개 정적인 메소드

Crawls up the tree until the template is found. Recurses along the inheritance of an items template.
public static GetAncestor ( this item, string templateId, int inheritanceDepth ) : System.Item
item this
templateId string
inheritanceDepth int 0 = 'Do not recurse', -1 = 'recurse as far as system base template', n = 'recurse a maximum of n times'
리턴 System.Item

GetRelatedItems() 공개 정적인 메소드

Gets a list of items linked to in fields of the item it is called on.
public static GetRelatedItems ( this item ) : IEnumerable
item this The item.
리턴 IEnumerable

IsMediaItem() 공개 정적인 메소드

Check against the item to see if it a media item
public static IsMediaItem ( this item ) : bool
item this
리턴 bool

IsNotNull() 공개 정적인 메소드

Checks to see if an item is not null
public static IsNotNull ( this item ) : bool
item this
리턴 bool

IsNull() 공개 정적인 메소드

Checks to see if an item is null
public static IsNull ( this item ) : bool
item this
리턴 bool

IsOfTemplate() 공개 정적인 메소드

check to verify that the item is of passed template
public static IsOfTemplate ( this item, string templateId ) : bool
item this
templateId string
리턴 bool

IsOfTemplate() 공개 정적인 메소드

Will check the item's template, if deep is enabled it will check item's base templates This signature should be avoided because of potential performance issues. If you MUST recurse along template inheritance prefer passing depth as an int and work to minimised its value
public static IsOfTemplate ( this item, string templateId, bool deep ) : bool
item this
templateId string
deep bool
리턴 bool

IsOfTemplate() 공개 정적인 메소드

Will check the item's template, if depth is non-zero it will recurse down the item's base templates
public static IsOfTemplate ( this item, string templateId, int depth ) : bool
item this
templateId string
depth int 0 = 'Do not recurse', -1 = 'recurse as far as system base template', n = 'recurse a maximum of n times'
리턴 bool

SerializeItem() 공개 정적인 메소드

Serialize Item to an xml file
public static SerializeItem ( this item, string folderPath ) : void
item this
folderPath string
리턴 void