[REF] move buildQuickForm function to the trait
[civicrm-core.git] / CRM / Event / Form / Task / Email.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17
18 /**
19 * This class provides the functionality to email a group of
20 * contacts.
21 */
22 class CRM_Event_Form_Task_Email extends CRM_Event_Form_Task {
23 use CRM_Contact_Form_Task_EmailTrait;
24
25 /**
26 * Build all the data structures needed to build the form.
27 */
28 public function preProcess() {
29 CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
30 parent::preProcess();
31
32 // we have all the participant ids, so now we get the contact ids
33 parent::setContactIDs();
34
35 $this->assign('single', $this->_single);
36 }
37
38 /**
39 * List available tokens for this form.
40 *
41 * @return array
42 */
43 public function listTokens() {
44 $tokens = CRM_Core_SelectValues::contactTokens();
45 return $tokens;
46 }
47
48 }