mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
887da2374b
commit
bcf57982cc
@ -97,6 +97,13 @@ class DataObjectSet extends ViewableData implements IteratorAggregate, Countable
|
|||||||
$item->destroy();
|
$item->destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all the items in this set.
|
||||||
|
*/
|
||||||
|
public function emptyItems() {
|
||||||
|
$this->items = array();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert this DataObjectSet to an array of DataObjects.
|
* Convert this DataObjectSet to an array of DataObjects.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user