using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors { /// /// A property editor to allow multiple checkbox selection of pre-defined items. /// [DataEditor( Constants.PropertyEditors.Aliases.CheckBoxList, "Checkbox list", "checkboxlist", Icon = "icon-bulleted-list", Group = Constants.PropertyEditors.Groups.Lists)] public class CheckBoxListPropertyEditor : DataEditor { private readonly ILocalizedTextService _textService; /// /// The constructor will setup the property editor based on the attribute if one is found /// public CheckBoxListPropertyEditor(ILogger logger, ILocalizedTextService textService) : base(logger) { _textService = textService; } /// protected override IConfigurationEditor CreateConfigurationEditor() => new ValueListConfigurationEditor(_textService); /// protected override IDataValueEditor CreateValueEditor() => new MultipleValueEditor(Logger, Attribute); } }