mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Documentation in DataObjectSet
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107400 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
342d739504
commit
423a526c8d
@ -491,6 +491,9 @@ class DataObjectSet extends ViewableData implements IteratorAggregate, Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge another set onto the end of this set.
|
* Merge another set onto the end of this set.
|
||||||
|
* To merge without causing duplicates, consider calling
|
||||||
|
* {@link removeDuplicates()} after this method on the new set.
|
||||||
|
*
|
||||||
* @param DataObjectSet $anotherSet Set to mege onto this set.
|
* @param DataObjectSet $anotherSet Set to mege onto this set.
|
||||||
*/
|
*/
|
||||||
public function merge($anotherSet){
|
public function merge($anotherSet){
|
||||||
@ -789,6 +792,8 @@ class DataObjectSet extends ViewableData implements IteratorAggregate, Countable
|
|||||||
/**
|
/**
|
||||||
* Remove duplicates from this set based on the dataobjects field.
|
* Remove duplicates from this set based on the dataobjects field.
|
||||||
* Assumes all items contained in the set all have that field.
|
* Assumes all items contained in the set all have that field.
|
||||||
|
* Useful after merging to sets via {@link merge()}.
|
||||||
|
*
|
||||||
* @param string $field the field to check for duplicates
|
* @param string $field the field to check for duplicates
|
||||||
*/
|
*/
|
||||||
public function removeDuplicates($field = 'ID') {
|
public function removeDuplicates($field = 'ID') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user