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
19 * BAO object for crm_email table.
21 class CRM_Contact_BAO_SubscriptionHistory
extends CRM_Contact_DAO_SubscriptionHistory
{
26 public function __construct() {
27 parent
::__construct();
31 * Create a new subscription history record.
33 * @param array $params
34 * Values for the new history record.
37 * $history The new history object
39 public static function &create(&$params) {
40 $history = new CRM_Contact_BAO_SubscriptionHistory();
41 $history->date
= date('Ymd');
42 $history->copyValues($params);
48 * Erase a contact's subscription history records.
53 public static function deleteContact($id) {
54 $history = new CRM_Contact_BAO_SubscriptionHistory();
55 $history->contact_id
= $id;