From 277a9afeab150981021a803c944b7c4501dba827 Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Tue, 23 Nov 2021 18:02:32 +0530 Subject: [PATCH] Add in APIv4 Logging Entity --- CRM/Core/BAO/Log.php | 4 ++-- Civi/Api4/Log.php | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Civi/Api4/Log.php diff --git a/CRM/Core/BAO/Log.php b/CRM/Core/BAO/Log.php index 382fbb5c31..719245f55c 100644 --- a/CRM/Core/BAO/Log.php +++ b/CRM/Core/BAO/Log.php @@ -56,13 +56,13 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log { * * @param array $params * Array of name-value pairs of log table. - * + * @return CRM_Core_DAO_Log */ public static function add(&$params) { - $log = new CRM_Core_DAO_Log(); $log->copyValues($params); $log->save(); + return $log; } /** diff --git a/Civi/Api4/Log.php b/Civi/Api4/Log.php new file mode 100644 index 0000000000..862cc83ff6 --- /dev/null +++ b/Civi/Api4/Log.php @@ -0,0 +1,22 @@ +