From 9fe720f088d60f38a123607683610cf4b2f4907f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 3 Feb 2020 13:17:58 -0500 Subject: [PATCH] Clearer docblock description of the defaults param --- Civi/Api4/Generic/AbstractSaveAction.php | 4 +++- Civi/Api4/Generic/BasicReplaceAction.php | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Civi/Api4/Generic/AbstractSaveAction.php b/Civi/Api4/Generic/AbstractSaveAction.php index 062beb7926..a644cc459c 100644 --- a/Civi/Api4/Generic/AbstractSaveAction.php +++ b/Civi/Api4/Generic/AbstractSaveAction.php @@ -48,7 +48,9 @@ abstract class AbstractSaveAction extends AbstractAction { /** * Array of default values. * - * These defaults will be applied to all $ENTITYs unless they specify otherwise. + * These defaults will be merged into every $ENTITY in `records` before saving. + * Values set in `records` will override these defaults if set in both places, + * but updating existing $ENTITYs will overwrite current values with these defaults. * * @var array */ diff --git a/Civi/Api4/Generic/BasicReplaceAction.php b/Civi/Api4/Generic/BasicReplaceAction.php index 8ae267cf59..10edcaa9ec 100644 --- a/Civi/Api4/Generic/BasicReplaceAction.php +++ b/Civi/Api4/Generic/BasicReplaceAction.php @@ -56,9 +56,11 @@ class BasicReplaceAction extends AbstractBatchAction { /** * Array of default values. * - * Will be merged into `records` before saving. + * These defaults will be merged into every $ENTITY in `records` before saving. + * Values set in `records` will override these defaults if set in both places, + * but updating existing $ENTITYs will overwrite current values with these defaults. * - * **Note:** Values from the `where` clause that use the `=` operator are _also_ saved into each record; + * **Note:** Values from the `where` clause that use the `=` operator are _also_ treated as default values; * those do not need to be repeated here. * * @var array -- 2.25.1