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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94297 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-12-03 00:34:06 +00:00 committed by Sam Minnee
parent 887da2374b
commit bcf57982cc

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.