From 6c541940e40f126bebb5c2c4697702b2c9e6753f Mon Sep 17 00:00:00 2001 From: Julian Seidenberg Date: Fri, 17 Sep 2010 02:27:44 +0000 Subject: [PATCH] MINOR: updated comments on new methods that duplicate relations to be compatible with PHPDoc git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@110909 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObject.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core/model/DataObject.php b/core/model/DataObject.php index 8d462ddc732..abb87224e46 100755 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -400,7 +400,11 @@ function duplicate($doWrite = true) { /** * Copies the many_many and belongs_many_many relations from one object to another instance of the name of object * The destinationObject must be written to the database already and have an ID. Writing is performed automatically when adding the new relations. - * @return DataObject with the new many_many relations copied in */ + * + * @param $sourceObject the source object to duplicate from + * @param $destinationObject the destination object to populate with the duplicated relations + * @return DataObject with the new many_many relations copied in + */ protected function duplicateManyManyRelations($sourceObject, $destinationObject) { if (!$destinationObject || $destinationObject->ID < 1) user_error("Can't duplicate relations for an object that has not been written to the database", E_USER_ERROR); @@ -418,7 +422,12 @@ protected function duplicateManyManyRelations($sourceObject, $destinationObject) return $destinationObject; } - /** Helper function to duplicate relations from one object to another */ + /** + * Helper function to duplicate relations from one object to another + * @param $sourceObject the source object to duplicate from + * @param $destinationObject the destination object to populate with the duplicated relations + * @param $name the name of the relation to duplicate (e.g. members) + */ private function duplicateRelations($sourceObject, $destinationObject, $name) { $relations = $sourceObject->$name(); if ($relations) {