C# Class Sitecore.Foundation.SitecoreExtensions.Extensions.ItemExtensions

显示文件 Open project: Sitecore/Habitat

Public Methods

Method Description
Field ( this item, ID fieldId ) : System.Web.HtmlString
FieldHasValue ( this item, ID fieldID ) : bool
GetAncestorOrSelfOfTemplate ( this item, ID templateID ) : System.Item
GetAncestorsAndSelfOfTemplate ( this item, ID templateID ) : IList
GetInteger ( this item, ID fieldId ) : int?
GetMultiListValueItems ( this item, ID fieldId ) : IEnumerable
HasContextLanguage ( this item ) : bool
HasLayout ( this item ) : bool
ImageUrl ( this item, ID imageFieldId, MediaUrlOptions options = null ) : string
IsDerived ( this item, ID templateId ) : bool
IsImage ( this item ) : bool
IsVideo ( this item ) : bool
LinkFieldOptions ( this item, ID fieldID, LinkFieldOption option ) : string
LinkFieldTarget ( this item, ID fieldID ) : string
LinkFieldUrl ( this item, ID fieldID ) : string
MediaUrl ( this item, ID mediaFieldId, MediaUrlOptions options = null ) : string
TargetItem ( this item, ID linkFieldId ) : System.Item
Url ( this item, UrlOptions options = null ) : string

Private Methods

Method Description
IsDerived ( this item, System.Item templateItem ) : bool

Method Details

Field() public static method

public static Field ( this item, ID fieldId ) : System.Web.HtmlString
item this
fieldId ID
return System.Web.HtmlString

FieldHasValue() public static method

public static FieldHasValue ( this item, ID fieldID ) : bool
item this
fieldID ID
return bool

GetAncestorOrSelfOfTemplate() public static method

public static GetAncestorOrSelfOfTemplate ( this item, ID templateID ) : System.Item
item this
templateID ID
return System.Item

GetAncestorsAndSelfOfTemplate() public static method

public static GetAncestorsAndSelfOfTemplate ( this item, ID templateID ) : IList
item this
templateID ID
return IList

GetInteger() public static method

public static GetInteger ( this item, ID fieldId ) : int?
item this
fieldId ID
return int?

GetMultiListValueItems() public static method

public static GetMultiListValueItems ( this item, ID fieldId ) : IEnumerable
item this
fieldId ID
return IEnumerable

HasContextLanguage() public static method

public static HasContextLanguage ( this item ) : bool
item this
return bool

HasLayout() public static method

public static HasLayout ( this item ) : bool
item this
return bool

ImageUrl() public static method

public static ImageUrl ( this item, ID imageFieldId, MediaUrlOptions options = null ) : string
item this
imageFieldId ID
options MediaUrlOptions
return string

IsDerived() public static method

public static IsDerived ( this item, ID templateId ) : bool
item this
templateId ID
return bool

IsImage() public static method

public static IsImage ( this item ) : bool
item this
return bool

IsVideo() public static method

public static IsVideo ( this item ) : bool
item this
return bool

LinkFieldOptions() public static method

public static LinkFieldOptions ( this item, ID fieldID, LinkFieldOption option ) : string
item this
fieldID ID
option LinkFieldOption
return string

LinkFieldTarget() public static method

public static LinkFieldTarget ( this item, ID fieldID ) : string
item this
fieldID ID
return string

LinkFieldUrl() public static method

public static LinkFieldUrl ( this item, ID fieldID ) : string
item this
fieldID ID
return string

MediaUrl() public static method

public static MediaUrl ( this item, ID mediaFieldId, MediaUrlOptions options = null ) : string
item this
mediaFieldId ID
options MediaUrlOptions
return string

TargetItem() public static method

public static TargetItem ( this item, ID linkFieldId ) : System.Item
item this
linkFieldId ID
return System.Item

Url() public static method

public static Url ( this item, UrlOptions options = null ) : string
item this
options UrlOptions
return string