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 +--------------------------------------------------------------------+
13 * Membership status override types.
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
18 class CRM_Member_StatusOverrideTypes
{
20 * The membership status is not overridden
21 * and its is subject to membership status rules.
26 * The membership will stay at the selected status
27 * and its status is NOT subject to membership
33 * The membership status will stay at the
34 * selected status and it is NOT subject to membership status rules.
35 * However, on the selected date(status_override_end_date),
36 * the status override type will automatically change to "NO" thus then
37 * the membership becomes subject to membership status rules.
42 * Gets the list of override types
43 * as a list of options to be used
47 * In ['Type 1 Value' => 'Type 1 Label'] format
49 public static function getSelectOptions() {
52 self
::PERMANENT
=> ts('Override Permanently'),
53 self
::UNTIL_DATE
=> ts('Override Until Selected Date'),
58 * Determines if the override type means
59 * that the membership is overridden or not.
60 * For now, only "NO" type means that the membership
61 * status is not overridden.
63 * @param $overrideType
67 public static function isOverridden($overrideType) {
68 if ($overrideType == self
::NO
) {
75 public static function isNo($overrideType) {
76 if ($overrideType != self
::NO
) {
83 public static function isPermanent($overrideType) {
84 if ($overrideType != self
::PERMANENT
) {
91 public static function isUntilDate($overrideType) {
92 if ($overrideType != self
::UNTIL_DATE
) {