Rename CRM_Contribute_BAO_ManagePremiums to CRM_Contribute_BAO_Product and deprecate...
[civicrm-core.git] / CRM / Contribute / BAO / ManagePremiums.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
fee14197 4 | CiviCRM version 5 |
6a488035 5 +--------------------------------------------------------------------+
8c9251b3 6 | Copyright CiviCRM LLC (c) 2004-2018 |
6a488035
TO
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
d25dd0ee 26 */
6a488035
TO
27
28/**
29 *
30 * @package CRM
8c9251b3 31 * @copyright CiviCRM LLC (c) 2004-2018
37828d4f 32 * @deprecated
6a488035 33 */
37828d4f 34class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_BAO_Product {
6a488035
TO
35
36 /**
fe482240 37 * Class constructor.
6a488035 38 */
00be9182 39 public function __construct() {
37828d4f 40 CRM_Core_Error::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::construct');
6a488035
TO
41 parent::__construct();
42 }
43
44 /**
fe482240 45 * Fetch object based on array of properties.
6a488035 46 *
37828d4f 47 * @deprecated
014c4014
TO
48 * @param array $params
49 * (reference ) an assoc array of name/value pairs.
50 * @param array $defaults
51 * (reference ) an assoc array to hold the flattened values.
6a488035 52 *
37828d4f 53 * @return CRM_Contribute_BAO_ManagePremiums
6a488035 54 */
00be9182 55 public static function retrieve(&$params, &$defaults) {
37828d4f
MW
56 CRM_Core_Error::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::retrieve');
57 return parent::retrieve($params, $defaults);
6a488035
TO
58 }
59
60 /**
fe482240 61 * Update the is_active flag in the db.
6a488035 62 *
37828d4f 63 * @deprecated
014c4014
TO
64 * @param int $id
65 * Id of the database record.
66 * @param bool $is_active
67 * Value we want to set the is_active field.
6a488035 68 *
de22d771 69 * @return bool
6a488035 70 */
00be9182 71 public static function setIsActive($id, $is_active) {
37828d4f
MW
72 CRM_Core_Error::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::setIsActive');
73 return parent::setIsActive($id, $is_active);
6a488035
TO
74 }
75
76 /**
706f6a01 77 * Add a premium product to the database, and return it.
6a488035 78 *
37828d4f 79 * @deprecated
014c4014
TO
80 * @param array $params
81 * Reference array contains the values submitted by the form.
c2e7de48 82 * @param array $ids (deprecated)
014c4014 83 * Reference array contains the id.
6a488035 84 *
706f6a01 85 * @return CRM_Contribute_DAO_Product
6a488035 86 */
c2e7de48 87 public static function add(&$params, $ids) {
37828d4f
MW
88 CRM_Core_Error::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::add');
89 return parent::add($params, $ids);
6a488035
TO
90 }
91
92 /**
fe482240 93 * Delete premium Types.
6a488035 94 *
37828d4f 95 * @deprecated
6a488035 96 * @param int $productID
de22d771 97 *
98 * @throws \CRM_Core_Exception
6a488035 99 */
00be9182 100 public static function del($productID) {
37828d4f
MW
101 CRM_Core_Error::deprecatedFunctionWarning('CRM_Contribute_BAO_Product::del');
102 return parent::del($productID);
6a488035 103 }
96025800 104
6a488035 105}