FEATURE Added DataObjectSet::emptyItems() to remove all the items from the set - this is useful for when you are augmenting CMS and front end fields via updateCMSFields() and updateFrontEndFields() on a DataObjectDecorator (from r94297)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95593 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-12-16 05:37:50 +00:00
parent f29c079792
commit bf9358ee46

View File

@ -97,6 +97,13 @@ class DataObjectSet extends ViewableData implements IteratorAggregate, Countable
$item->destroy();
}
}
/**
* Removes all the items in this set.
*/
public function emptyItems() {
$this->items = array();
}
/**
* Convert this DataObjectSet to an array of DataObjects.