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
18 class CRM_Contribute_BAO_ManagePremiums
extends CRM_Contribute_BAO_Product
{
23 public function __construct() {
24 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::construct');
25 parent
::__construct();
29 * Fetch object based on array of properties.
32 * @param array $params
33 * (reference ) an assoc array of name/value pairs.
34 * @param array $defaults
35 * (reference ) an assoc array to hold the flattened values.
37 * @return CRM_Contribute_BAO_Product
39 public static function retrieve(&$params, &$defaults) {
40 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::retrieve');
41 return parent
::retrieve($params, $defaults);
45 * Update the is_active flag in the db.
49 * Id of the database record.
50 * @param bool $is_active
51 * Value we want to set the is_active field.
55 public static function setIsActive($id, $is_active) {
56 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::setIsActive');
57 return parent
::setIsActive($id, $is_active);
61 * Add a premium product to the database, and return it.
64 * @param array $params
65 * Reference array contains the values submitted by the form.
66 * @param array $ids (deprecated)
67 * Reference array contains the id.
69 * @return CRM_Contribute_DAO_Product
71 public static function add(&$params, $ids) {
72 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::create');
73 $id = $params['id'] ??
$ids['premium'] ??
NULL;
77 return parent
::create($params);
81 * Delete premium Types.
84 * @param int $productID
86 * @throws \CRM_Core_Exception
88 public static function del($productID) {
89 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::del');
90 return parent
::del($productID);