3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 * This class contains functions for managing Action Logs
23 class CRM_Core_BAO_ActionLog
extends CRM_Core_DAO_ActionLog
{
26 * Create or update an action log entry.
28 * @param array $params
32 public static function create($params) {
33 $actionLog = new CRM_Core_DAO_ActionLog();
35 $params['action_date_time'] = CRM_Utils_Array
::value('action_date_time', $params, date('YmdHis'));
37 $actionLog->copyValues($params);
39 $edit = ($actionLog->id
) ?
TRUE : FALSE;
41 CRM_Utils_Hook
::pre('edit', 'ActionLog', $actionLog->id
, $actionLog);
44 CRM_Utils_Hook
::pre('create', 'ActionLog', NULL, $actionLog);
50 CRM_Utils_Hook
::post('edit', 'ActionLog', $actionLog->id
, $actionLog);
53 CRM_Utils_Hook
::post('create', 'ActionLog', NULL, $actionLog);