Skip to content

Commit

Permalink
Merge pull request #23129 from colemanw/api4_log_entity
Browse files Browse the repository at this point in the history
Add in APIv4 Logging Entity
  • Loading branch information
demeritcowboy authored Apr 8, 2022
2 parents 690acff + 277a9af commit 3d42004
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Core/BAO/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public static function &lastModified($id, $table = 'civicrm_contact') {
*
* @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;
}

/**
Expand Down
22 changes: 22 additions & 0 deletions Civi/Api4/Log.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/*
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
namespace Civi\Api4;

/**
* Log
*
* @since 5.49
* @package Civi\Api4
*/
class Log extends Generic\DAOEntity {
use Generic\Traits\ReadOnlyEntity;

}

0 comments on commit 3d42004

Please sign in to comment.