Merge pull request #5473 from aydun/CRM-16160
[civicrm-core.git] / CRM / Activity / Form / Task / SMS.php
index 4da9839aa10305b3e2b110faf7ff230fa496fee0..ed22a31af01da82c532f9e699af579a3e3b53672 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.                                    |
  |                                                                    |
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * This class provides the functionality to sms a group of
@@ -40,28 +40,26 @@ class CRM_Activity_Form_Task_SMS extends CRM_Activity_Form_Task {
   public $_single = 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
-   * @access public
    */
-  function preProcess() {
+  public function preProcess() {
     parent::preProcess();
     CRM_Contact_Form_Task_SMSCommon::preProcessProvider($this);
     $this->assign('single', $this->_single);
   }
 
   /**
-   * Build the form object
+   * Build the form object.
    *
-   * @access public
    *
    * @return void
    */
@@ -72,14 +70,23 @@ class CRM_Activity_Form_Task_SMS 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.
    *
-   * @access public
    *
    * @return void
    */
   public function postProcess() {
     CRM_Contact_Form_Task_SMSCommon::postProcess($this);
   }
-}
 
+  /**
+   * List available tokens for this form.
+   *
+   * @return array
+   */
+  public function listTokens() {
+    $tokens = CRM_Core_SelectValues::contactTokens();
+    return $tokens;
+  }
+
+}