C# Класс Sdl.Web.Common.Models.EclItem

Наследование: MediaItem
Показать файл Открыть проект

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

Метод Описание
GetEclExternalMetadataValue ( string key ) : object

Convenience method to obtain a single value from ECL External Metadata.

GetXpmMarkup ( Sdl.Web.Common.Configuration.Localization localization ) : string

Gets the rendered XPM markup

ECL items will use ECL URI rather than TCM URI in XPM markup

ReadFromXhtmlElement ( XmlElement xhtmlElement ) : void

Read properties from XHTML element.

ToHtml ( string widthFactor, double aspect, string cssClass = null, int containerSize ) : string

Renders an HTML representation of the ECL Item.

This method is used by the IRichTextFragment.ToHtml() implementation and by the HtmlHelperExtensions.Media implementation. Both cases should be avoided, since HTML rendering should be done in View code rather than in Model code.

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

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

Convenience method to obtain a single value from ECL External Metadata.
public GetEclExternalMetadataValue ( string key ) : object
key string The metadata key. This can contain slashes for nested metadata (e.g. "Program/Asset/Title").
Результат object

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

Gets the rendered XPM markup
ECL items will use ECL URI rather than TCM URI in XPM markup
public GetXpmMarkup ( Sdl.Web.Common.Configuration.Localization localization ) : string
localization Sdl.Web.Common.Configuration.Localization The context Localization.
Результат string

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

Read properties from XHTML element.
public ReadFromXhtmlElement ( XmlElement xhtmlElement ) : void
xhtmlElement System.Xml.XmlElement XHTML element
Результат void

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

Renders an HTML representation of the ECL Item.
This method is used by the IRichTextFragment.ToHtml() implementation and by the HtmlHelperExtensions.Media implementation. Both cases should be avoided, since HTML rendering should be done in View code rather than in Model code.
public ToHtml ( string widthFactor, double aspect, string cssClass = null, int containerSize ) : string
widthFactor string The factor to apply to the width - can be % (eg "100%") or absolute (eg "120").
aspect double The aspect ratio to apply.
cssClass string Optional CSS class name(s) to apply.
containerSize int The size (in grid column units) of the containing element.
Результат string