# Conflicts: # src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs # src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs # src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs # src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs # src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs # src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/DomainRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/TemplateRepositoryTest.cs # src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs # src/Umbraco.Tests/Published/NestedContentTests.cs # src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs # src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs # src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs # src/Umbraco.Tests/Services/ContentServiceTests.cs # src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs # src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs # src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs # src/Umbraco.Web/PropertyEditors/MediaPickerPropertyEditor.cs # src/Umbraco.Web/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs # src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs # src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs # src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs
57 lines
2.4 KiB
C#
57 lines
2.4 KiB
C#
using Umbraco.Composing;
|
|
using Umbraco.Core.Composing;
|
|
using Umbraco.Core.IO;
|
|
using Umbraco.Core.Logging;
|
|
using Umbraco.Core.Services;
|
|
using Umbraco.Core.Strings;
|
|
|
|
namespace Umbraco.Core.PropertyEditors
|
|
{
|
|
/// <summary>
|
|
/// Represents a property editor for label properties.
|
|
/// </summary>
|
|
[DataEditor(
|
|
Constants.PropertyEditors.Aliases.Label,
|
|
"Label",
|
|
"readonlyvalue",
|
|
Icon = "icon-readonly")]
|
|
public class LabelPropertyEditor : DataEditor
|
|
{
|
|
private readonly IIOHelper _ioHelper;
|
|
private readonly IDataTypeService _dataTypeService;
|
|
private readonly ILocalizedTextService _localizedTextService;
|
|
private readonly ILocalizationService _localizationService;
|
|
private readonly IShortStringHelper _shortStringHelper;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="LabelPropertyEditor"/> class.
|
|
/// </summary>
|
|
public LabelPropertyEditor(ILogger logger, IIOHelper ioHelper, IDataTypeService dataTypeService, ILocalizedTextService localizedTextService, ILocalizationService localizationService, IShortStringHelper shortStringHelper)
|
|
: base(logger, dataTypeService, localizationService, localizedTextService, shortStringHelper)
|
|
{
|
|
_ioHelper = ioHelper;
|
|
_dataTypeService = dataTypeService;
|
|
_localizedTextService = localizedTextService;
|
|
_localizationService = localizationService;
|
|
_shortStringHelper = shortStringHelper;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override IDataValueEditor CreateValueEditor() => new LabelPropertyValueEditor(_dataTypeService, _localizationService,_localizedTextService, _shortStringHelper, Attribute);
|
|
|
|
/// <inheritdoc />
|
|
protected override IConfigurationEditor CreateConfigurationEditor() => new LabelConfigurationEditor(_ioHelper);
|
|
|
|
// provides the property value editor
|
|
internal class LabelPropertyValueEditor : DataValueEditor
|
|
{
|
|
public LabelPropertyValueEditor(IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, DataEditorAttribute attribute)
|
|
: base(dataTypeService, localizationService, localizedTextService, shortStringHelper, attribute)
|
|
{ }
|
|
|
|
/// <inheritdoc />
|
|
public override bool IsReadOnly => true;
|
|
}
|
|
}
|
|
}
|