public WriteTextComponent(ResolvedField field) : base(field) { Elements = new AbstractElement[] { new TextElement { Element = new Reference { Codename = "field_details__name" }, Value = field.Name }, new TextElement { Element = new Reference { Codename = "field_details__comment" }, Value = field.Comment }, new RichTextElement { Element = new Reference { Codename = "default_text" }, Value = field.DefaultText } }; }
protected AbstractComponent(ResolvedField field) { Type = new Reference { Codename = field.Type }; }
public UploadFileComponent(ResolvedField field) : base(field) { Elements = new AbstractElement[] { new TextElement { Element = new Reference { Codename = "field_details__name" }, Value = field.Name }, new TextElement { Element = new Reference { Codename = "field_details__comment" }, Value = field.Comment } }; }
public string?Resolve(Field field) { var resolvedField = new ResolvedField { Name = field.FieldDetailsName, Codename = field.System.Codename, Comment = field.FieldDetailsComment, Type = field.System.Type }; switch (field.System.Type) { case download_asset: resolvedField.Assets = field.Assets; break; case write_text: resolvedField.DefaultText = field.DefaultText; break; } return(CoreHelper.Serialize(resolvedField)); }