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
19 class CRM_Member_StatusOverrideTypes
{
21 * The membership status is not overridden
22 * and its is subject to membership status rules.
27 * The membership will stay at the selected status
28 * and its status is NOT subject to membership
34 * The membership status will stay at the
35 * selected status and it is NOT subject to membership status rules.
36 * However, on the selected date(status_override_end_date),
37 * the status override type will automatically change to "NO" thus then
38 * the membership becomes subject to membership status rules.
43 * Gets the list of override types
44 * as a list of options to be used
48 * In ['Type 1 Value' => 'Type 1 Label'] format
50 public static function getSelectOptions() {
53 self
::PERMANENT
=> ts('Override Permanently'),
54 self
::UNTIL_DATE
=> ts('Override Until Selected Date'),
59 * Determines if the override type means
60 * that the membership is overridden or not.
61 * For now, only "NO" type means that the membership
62 * status is not overridden.
64 * @param $overrideType
68 public static function isOverridden($overrideType) {
69 if ($overrideType == self
::NO
) {
76 public static function isNo($overrideType) {
77 if ($overrideType != self
::NO
) {
84 public static function isPermanent($overrideType) {
85 if ($overrideType != self
::PERMANENT
) {
92 public static function isUntilDate($overrideType) {
93 if ($overrideType != self
::UNTIL_DATE
) {