Merge pull request #5473 from aydun/CRM-16160
[civicrm-core.git] / CRM / Activity / Form / Task / Email.php
index 8fa654f060df1325b1856aef945cbf62a02b1dc8..9f645046af79c4916352ee0addfb549b498eaab2 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id: Email.php 26615 2010-03-21 21:05:35Z kurund $
  *
  */
@@ -50,17 +50,18 @@ class CRM_Activity_Form_Task_Email extends CRM_Activity_Form_Task {
   public $_noEmails = FALSE;
 
   /**
-   * All the existing templates in the system
+   * All the existing templates in the system.
    *
    * @var array
    */
   public $_templates = NULL;
 
   /**
-   * Build all the data structures needed to build the form
+   * Build all the data structures needed to build the form.
    *
    * @return void
-   */ function preProcess() {
+   */
+  public function preProcess() {
     CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
     parent::preProcess();
 
@@ -71,7 +72,7 @@ class CRM_Activity_Form_Task_Email extends CRM_Activity_Form_Task {
   }
 
   /**
-   * Build the form object
+   * Build the form object.
    *
    *
    * @return void
@@ -84,7 +85,7 @@ class CRM_Activity_Form_Task_Email extends CRM_Activity_Form_Task {
   }
 
   /**
-   * Process the form after the input has been submitted and validated
+   * Process the form after the input has been submitted and validated.
    *
    *
    * @return void
@@ -92,4 +93,15 @@ class CRM_Activity_Form_Task_Email extends CRM_Activity_Form_Task {
   public function postProcess() {
     CRM_Contact_Form_Task_EmailCommon::postProcess($this);
   }
+
+  /**
+   * List available tokens for this form.
+   *
+   * @return array
+   */
+  public function listTokens() {
+    $tokens = CRM_Core_SelectValues::contactTokens();
+    return $tokens;
+  }
+
 }