Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Documentation in DataObjectSet (from r107400)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112575 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 8f8de04aafa0a5788d700abeca5cd9e1b578eb93 1 parent 380e0af
Ingo Schommer chillu authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 core/model/DataObjectSet.php
5 core/model/DataObjectSet.php
View
@@ -524,6 +524,9 @@ public function replace($itemOld, $itemNew) {
/**
* 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.
*/
public function merge($anotherSet){
@@ -822,6 +825,8 @@ public function sort($fieldname, $direction = "ASC") {
/**
* Remove duplicates from this set based on the dataobjects 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
*/
public function removeDuplicates($field = 'ID') {
Please sign in to comment.
Something went wrong with that request. Please try again.