using Umbraco.Core.Logging;
namespace Umbraco.Core.PropertyEditors
{
///
/// Represents a property editor for label properties.
///
[DataEditor(Constants.PropertyEditors.Aliases.NoEdit, "Label", "readonlyvalue", Icon = "icon-readonly")]
public class LabelPropertyEditor : DataEditor
{
///
/// Initializes a new instance of the class.
///
public LabelPropertyEditor(ILogger logger)
: base(logger)
{ }
///
protected override IDataValueEditor CreateValueEditor() => new LabelPropertyValueEditor(Attribute);
///
protected override IConfigurationEditor CreateConfigurationEditor() => new LabelConfigurationEditor();
// provides the property value editor
internal class LabelPropertyValueEditor : DataValueEditor
{
public LabelPropertyValueEditor(DataEditorAttribute attribute)
: base(attribute)
{ }
///
public override bool IsReadOnly => true;
}
}
}