-
-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22736 from eileenmcnaughton/membership_message
Cleanup on Offline Membership Receipts (ensures variables present across flows)
- Loading branch information
Showing
16 changed files
with
4,497 additions
and
4,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/* | ||
+--------------------------------------------------------------------+ | ||
| Copyright CiviCRM LLC. All rights reserved. | | ||
| | | ||
| This work is published under the GNU AGPLv3 license with some | | ||
| permitted exceptions and without any warranty. For full license | | ||
| and copyright information, see https://civicrm.org/licensing | | ||
+--------------------------------------------------------------------+ | ||
*/ | ||
|
||
use Civi\WorkflowMessage\GenericWorkflowMessage; | ||
|
||
/** | ||
* Receipt sent when confirming a back office membership. | ||
* | ||
* @support template-only | ||
* | ||
* @see CRM_Member_Form_MembershipRenewal::sendReceipt | ||
* @see CRM_Member_Form_Membership::emailReceipt | ||
* @see CRM_Batch_Form_Entry::emailReceipt | ||
*/ | ||
class CRM_Member_WorkflowMessage_MembershipOfflineReceipt extends GenericWorkflowMessage { | ||
use CRM_Member_WorkflowMessage_MembershipTrait; | ||
public const WORKFLOW = 'membership_offline_receipt'; | ||
|
||
/** | ||
* Additional text to include in the receipt. | ||
* | ||
* @var string | ||
* | ||
* @scope tplParams as receipt_text | ||
*/ | ||
protected $receiptText; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/* | ||
+--------------------------------------------------------------------+ | ||
| Copyright CiviCRM LLC. All rights reserved. | | ||
| | | ||
| This work is published under the GNU AGPLv3 license with some | | ||
| permitted exceptions and without any warranty. For full license | | ||
| and copyright information, see https://civicrm.org/licensing | | ||
+--------------------------------------------------------------------+ | ||
*/ | ||
|
||
use Civi\WorkflowMessage\GenericWorkflowMessage; | ||
|
||
/** | ||
* Receipt sent when confirming a back office membership. | ||
* | ||
* @support template-only | ||
* | ||
* @see CRM_Member_Form_MembershipRenewal::sendReceipt | ||
* @see CRM_Member_Form_Membership::emailReceipt | ||
* @see CRM_Batch_Form_Entry::emailReceipt | ||
*/ | ||
class CRM_Member_WorkflowMessage_MembershipOnlineReceipt extends GenericWorkflowMessage { | ||
use CRM_Member_WorkflowMessage_MembershipTrait; | ||
public const WORKFLOW = 'membership_online_receipt'; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/** | ||
* @method array getMembership() | ||
* @method ?int getMembershipID() | ||
* @method $this setMembershipID(?int $membershipID) | ||
* @method ?int getContributionID() | ||
* @method $this setContributionID(?int $membershipID) | ||
*/ | ||
trait CRM_Member_WorkflowMessage_MembershipTrait { | ||
/** | ||
* The membership. | ||
* | ||
* @var array|null | ||
* | ||
* @scope tokenContext as membership | ||
*/ | ||
protected $membership; | ||
|
||
/** | ||
* @var int | ||
* @scope tokenContext as membershipId, tplParams as membershipID | ||
*/ | ||
protected $membershipID; | ||
|
||
/** | ||
* Contribution ID. | ||
* | ||
* @var int | ||
* | ||
* @scope tokenContext as contributionId, tplParams as contributionID | ||
*/ | ||
protected $contributionID; | ||
|
||
/** | ||
* Set membership object. | ||
* | ||
* @param array $membership | ||
* | ||
* @return $this | ||
*/ | ||
public function setMembership(array $membership): self { | ||
$this->membership = $membership; | ||
if (!empty($membership['id'])) { | ||
$this->membershipId = $membership['id']; | ||
} | ||
return $this; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.