Added method to add to a list of ConfigurationFields
This commit is contained in:
committed by
Sebastiaan Janssen
parent
c271113da5
commit
ff72a341b2
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
public static partial class ConfigurationFieldsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds a configuration field.
|
||||
/// </summary>
|
||||
/// <param name="fields">The list of configuration fields.</param>
|
||||
/// <param name="key">The key (alias) of the field.</param>
|
||||
/// <param name="name">The name (label) of the field.</param>
|
||||
/// <param name="description">The description for the field.</param>
|
||||
/// <param name="view">The path to the editor view to be used for the field.</param>
|
||||
/// <param name="config">Optional configuration used for field's editor.</param>
|
||||
public static void Add(
|
||||
this List<ConfigurationField> fields,
|
||||
string key,
|
||||
string name,
|
||||
string description,
|
||||
string view,
|
||||
IDictionary<string, object> config = null)
|
||||
{
|
||||
fields.Add(new ConfigurationField
|
||||
{
|
||||
Key = key,
|
||||
Name = name,
|
||||
Description = description,
|
||||
View = view,
|
||||
Config = config,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -267,6 +267,7 @@
|
||||
<Compile Include="Models\PublishedContent\ILivePublishedModelFactory.cs" />
|
||||
<Compile Include="Models\PublishedContent\IPublishedContentType.cs" />
|
||||
<Compile Include="Models\PublishedContent\IPublishedPropertyType.cs" />
|
||||
<Compile Include="PropertyEditors\ConfigurationFieldsExtensions.cs" />
|
||||
<Compile Include="PropertyEditors\IIgnoreUserStartNodesConfig.cs" />
|
||||
<Compile Include="PublishedContentExtensions.cs" />
|
||||
<Compile Include="Models\PublishedContent\UrlMode.cs" />
|
||||
|
||||
Reference in New Issue
Block a user