Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 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 | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | ||
18 | /** | |
19 | * This class provides the functionality to email a group of | |
20 | * contacts. | |
21 | */ | |
22 | class CRM_Member_Form_Task_Email extends CRM_Member_Form_Task { | |
8a432af6 | 23 | use CRM_Contact_Form_Task_EmailTrait; |
6a488035 | 24 | |
4f036b71 EM |
25 | /** |
26 | * Only send one email per contact. | |
27 | * | |
28 | * This has historically been done for contributions & makes sense if | |
29 | * no entity specific tokens are in use. | |
30 | * | |
31 | * @return bool | |
32 | * @throws \CRM_Core_Exception | |
33 | */ | |
34 | protected function isGroupByContact(): bool { | |
35 | return !empty($this->getMessageTokens()['membership']); | |
36 | } | |
37 | ||
6a488035 | 38 | } |