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 sms a group of contacts.
21 class CRM_Contact_Form_Task_SMS
extends CRM_Contact_Form_Task
{
24 * Are we operating in "single mode", i.e. sending sms to one
29 public $_single = FALSE;
32 * All the existing templates in the system.
36 public $_templates = NULL;
38 public function preProcess() {
40 $this->_context
= CRM_Utils_Request
::retrieve('context', 'Alphanumeric', $this);
42 $cid = CRM_Utils_Request
::retrieve('cid', 'Positive', $this, FALSE);
44 CRM_Contact_Form_Task_SMSCommon
::preProcessProvider($this);
46 if (!$cid && $this->_context
!= 'standalone') {
50 $this->assign('single', $this->_single
);
51 if (CRM_Core_Permission
::check('administer CiviCRM')) {
52 $this->assign('isAdmin', 1);
57 * Build the form object.
59 public function buildQuickForm() {
61 $this->assign('suppressForm', FALSE);
62 $this->assign('SMSTask', TRUE);
63 CRM_Contact_Form_Task_SMSCommon
::buildQuickForm($this);
67 * Process the form after the input has been submitted and validated.
69 public function postProcess() {
70 CRM_Contact_Form_Task_SMSCommon
::postProcess($this);
74 * List available tokens for this form.
78 public function listTokens() {
79 $tokens = CRM_Core_SelectValues
::contactTokens();