Obsolete AddPropertyGroup without specifying alias
This commit is contained in:
@@ -297,26 +297,12 @@ namespace Umbraco.Core.Models
|
||||
/// <returns>Returns <c>True</c> if a PropertyType with the passed in alias exists, otherwise <c>False</c></returns>
|
||||
public abstract bool PropertyTypeExists(string propertyTypeAlias);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a property group with the alias based on the name.
|
||||
/// This method will also check if a group already exists with the same alias.
|
||||
/// </summary>
|
||||
/// <param name="groupName">Name of the PropertyGroup to add</param>
|
||||
/// <returns>
|
||||
/// Returns <c>True</c> if a PropertyGroup with the passed in name was added, otherwise <c>False</c>
|
||||
/// </returns>
|
||||
/// <inheritdoc />
|
||||
[Obsolete("Use AddPropertyGroup(name, alias) instead to explicitly set the alias.")]
|
||||
public abstract bool AddPropertyGroup(string groupName);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a PropertyGroup.
|
||||
/// This method will also check if a group already exists with the same name and link it to the parent.
|
||||
/// </summary>
|
||||
/// <param name="groupName">Name of the PropertyGroup to add</param>
|
||||
/// <param name="alias">The alias.</param>
|
||||
/// <returns>
|
||||
/// Returns <c>True</c> if a PropertyGroup with the passed in name was added, otherwise <c>False</c>
|
||||
/// </returns>
|
||||
public abstract bool AddPropertyGroup(string groupName, string alias);
|
||||
/// <inheritdoc />
|
||||
public abstract bool AddPropertyGroup(string name, string alias);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a PropertyType to a specific PropertyGroup
|
||||
|
||||
@@ -206,15 +206,16 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Obsolete("Use AddPropertyGroup(name, alias) instead to explicitly set the alias.")]
|
||||
public override bool AddPropertyGroup(string groupName)
|
||||
{
|
||||
return AddAndReturnPropertyGroup(groupName, groupName.ToSafeAlias(true)) != null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool AddPropertyGroup(string groupName, string alias)
|
||||
public override bool AddPropertyGroup(string name, string alias)
|
||||
{
|
||||
return AddAndReturnPropertyGroup(groupName, alias) != null;
|
||||
return AddAndReturnPropertyGroup(name, alias) != null;
|
||||
}
|
||||
|
||||
private PropertyGroup AddAndReturnPropertyGroup(string name, string alias)
|
||||
|
||||
@@ -154,12 +154,13 @@ namespace Umbraco.Core.Models
|
||||
/// <remarks>
|
||||
/// This method will also check if a group already exists with the same alias.
|
||||
/// </remarks>
|
||||
[Obsolete("Use AddPropertyGroup(name, alias) instead to explicitly set the alias.")]
|
||||
bool AddPropertyGroup(string groupName);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a property group with the specified <paramref name="groupName" /> and <paramref name="alias" />.
|
||||
/// Adds a property group with the specified <paramref name="name" /> and <paramref name="alias" />.
|
||||
/// </summary>
|
||||
/// <param name="groupName">Name of the group.</param>
|
||||
/// <param name="name">Name of the group.</param>
|
||||
/// <param name="alias">The alias.</param>
|
||||
/// <returns>
|
||||
/// Returns <c>true</c> if a property group with specified <paramref name="alias" /> was added; otherwise, <c>false</c>.
|
||||
@@ -167,7 +168,7 @@ namespace Umbraco.Core.Models
|
||||
/// <remarks>
|
||||
/// This method will also check if a group already exists with the same alias.
|
||||
/// </remarks>
|
||||
bool AddPropertyGroup(string groupName, string alias);
|
||||
bool AddPropertyGroup(string name, string alias);
|
||||
|
||||
/// <summary>
|
||||
/// Moves a PropertyType to a specified PropertyGroup
|
||||
|
||||
Reference in New Issue
Block a user