3 +--------------------------------------------------------------------+
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2019 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 * Membership status override types.
32 * @copyright CiviCRM LLC (c) 2004-2019
35 class CRM_Member_StatusOverrideTypes
{
37 * The membership status is not overridden
38 * and its is subject to membership status rules.
43 * The membership will stay at the selected status
44 * and its status is NOT subject to membership
50 * The membership status will stay at the
51 * selected status and it is NOT subject to membership status rules.
52 * However, on the selected date(status_override_end_date),
53 * the status override type will automatically change to "NO" thus then
54 * the membership becomes subject to membership status rules.
59 * Gets the list of override types
60 * as a list of options to be used
64 * In ['Type 1 Value' => 'Type 1 Label'] format
66 public static function getSelectOptions() {
69 self
::PERMANENT
=> ts('Override Permanently'),
70 self
::UNTIL_DATE
=> ts('Override Until Selected Date'),
75 * Determines if the override type means
76 * that the membership is overridden or not.
77 * For now, only "NO" type means that the membership
78 * status is not overridden.
80 * @param $overrideType
84 public static function isOverridden($overrideType) {
85 if ($overrideType == self
::NO
) {
92 public static function isNo($overrideType) {
93 if ($overrideType != self
::NO
) {
100 public static function isPermanent($overrideType) {
101 if ($overrideType != self
::PERMANENT
) {
108 public static function isUntilDate($overrideType) {
109 if ($overrideType != self
::UNTIL_DATE
) {