Added RemovePropertyGroup method

This commit is contained in:
Stefan Kip
2013-06-23 16:38:11 +02:00
parent 9739b3e2ef
commit f3e737720b
3 changed files with 23 additions and 0 deletions

View File

@@ -97,6 +97,14 @@ namespace Umbraco.Core.Models
return this.Any(x => x.Name == groupName);
}
public void RemoveItem(string propertyGroupName)
{
var key = IndexOfKey(propertyGroupName);
//Only removes an item if the key was found
if (key != -1)
RemoveItem(key);
}
public int IndexOfKey(string key)
{
for (var i = 0; i < this.Count; i++)