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 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class provides the functionality to email a group of contacts.
21 class CRM_Contribute_Form_Task_Email
extends CRM_Contribute_Form_Task
{
24 * Are we operating in "single mode", i.e. sending email to one
29 public $_single = FALSE;
31 public $_noEmails = FALSE;
34 * All the existing templates in the system.
38 public $_templates = NULL;
41 * Build all the data structures needed to build the form.
43 public function preProcess() {
44 CRM_Contact_Form_Task_EmailCommon
::preProcessFromAddress($this);
47 // we have all the contribution ids, so now we get the contact ids
48 parent
::setContactIDs();
50 $this->assign('single', $this->_single
);
54 * Build the form object.
56 public function buildQuickForm() {
58 $this->assign('emailTask', TRUE);
60 CRM_Contact_Form_Task_EmailCommon
::buildQuickForm($this);
64 * Process the form after the input has been submitted and validated.
66 public function postProcess() {
67 CRM_Contact_Form_Task_EmailCommon
::postProcess($this);
71 * List available tokens for this form.
75 public function listTokens() {
76 $tokens = CRM_Core_SelectValues
::contactTokens();
77 $tokens = array_merge(CRM_Core_SelectValues
::contributionTokens(), $tokens);