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
This commit is contained in:
Julian Seidenberg 2010-09-17 02:27:44 +00:00
parent c32a6e34a0
commit 6c541940e4

View File

@ -400,7 +400,11 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
/**
* 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 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
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) {