Merge pull request #21213 from colemanw/entityBatchRef
[civicrm-core.git] / CRM / Member / BAO / MembershipBlock.php
CommitLineData
b488bd43
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
b488bd43 5 | |
bc77d7c0
TO
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 |
b488bd43 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
b488bd43
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
b488bd43
TO
16 */
17class CRM_Member_BAO_MembershipBlock extends CRM_Member_DAO_MembershipBlock {
971e129b 18
28abbcb0 19 /**
fe482240 20 * Class constructor.
28abbcb0 21 */
00be9182 22 public function __construct() {
28abbcb0 23 parent::__construct();
24 }
353ffa53 25
28abbcb0 26 /**
6a5fec96 27 * Create or update a MembershipBlock.
28abbcb0 28 *
b2363ea8 29 * @param array $params
6a5fec96 30 * @return CRM_Member_DAO_MembershipBlock
28abbcb0 31 */
6a5fec96
CW
32 public static function create($params) {
33 return self::writeRecord($params);
28abbcb0 34 }
35
36 /**
fe482240 37 * Delete membership Blocks.
28abbcb0 38 *
39 * @param int $id
67d870c5 40 * @deprecated
77b97be7 41 * @return bool
28abbcb0 42 */
00be9182 43 public static function del($id) {
67d870c5 44 return (bool) self::deleteRecord(['id' => $id]);
28abbcb0 45 }
46
47}