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 * @param array $defaults
35 * @return CRM_Contribute_BAO_Product
37 public static function retrieve(&$params, &$defaults) {
38 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::retrieve');
39 return parent
::retrieve($params, $defaults);
43 * Update the is_active flag in the db.
47 * Id of the database record.
48 * @param bool $is_active
49 * Value we want to set the is_active field.
53 public static function setIsActive($id, $is_active) {
54 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::setIsActive');
55 return parent
::setIsActive($id, $is_active);
59 * Add a premium product to the database, and return it.
62 * @param array $params
63 * Reference array contains the values submitted by the form.
64 * @param array $ids (deprecated)
65 * Reference array contains the id.
67 * @return CRM_Contribute_DAO_Product
69 public static function add(&$params, $ids) {
70 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::create');
71 $id = $params['id'] ??
$ids['premium'] ??
NULL;
75 return parent
::create($params);
79 * Delete premium Types.
82 * @param int $productID
84 * @throws \CRM_Core_Exception
86 public static function del($productID) {
87 CRM_Core_Error
::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::del');
88 return parent
::del($productID);