Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
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 | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 | 11 | |
7808aae6 SB |
12 | /** |
13 | * @package CRM | |
ca5cec67 | 14 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
7808aae6 SB |
15 | */ |
16 | ||
6a488035 | 17 | /** |
b6c94f42 | 18 | * This class provides the functionality to sms a group of contacts. |
6a488035 TO |
19 | */ |
20 | class CRM_Activity_Form_Task_SMS extends CRM_Activity_Form_Task { | |
21 | ||
22 | /** | |
23 | * Are we operating in "single mode", i.e. sending sms to one | |
24 | * specific contact? | |
25 | * | |
d51c6add | 26 | * @var bool |
6a488035 TO |
27 | */ |
28 | public $_single = FALSE; | |
29 | ||
30 | /** | |
fe482240 | 31 | * All the existing templates in the system. |
6a488035 TO |
32 | * |
33 | * @var array | |
34 | */ | |
35 | public $_templates = NULL; | |
36 | ||
37 | /** | |
fe482240 | 38 | * Build all the data structures needed to build the form. |
6a488035 | 39 | */ |
00be9182 | 40 | public function preProcess() { |
6a488035 TO |
41 | parent::preProcess(); |
42 | CRM_Contact_Form_Task_SMSCommon::preProcessProvider($this); | |
43 | $this->assign('single', $this->_single); | |
44 | } | |
45 | ||
46 | /** | |
fe482240 | 47 | * Build the form object. |
6a488035 TO |
48 | */ |
49 | public function buildQuickForm() { | |
7808aae6 | 50 | // Enable form element. |
6a488035 TO |
51 | $this->assign('SMSTask', TRUE); |
52 | CRM_Contact_Form_Task_SMSCommon::buildQuickForm($this); | |
53 | } | |
54 | ||
55 | /** | |
fe482240 | 56 | * Process the form after the input has been submitted and validated. |
6a488035 TO |
57 | */ |
58 | public function postProcess() { | |
59 | CRM_Contact_Form_Task_SMSCommon::postProcess($this); | |
60 | } | |
96025800 | 61 | |
5ec6b0ad TM |
62 | /** |
63 | * List available tokens for this form. | |
64 | * | |
65 | * @return array | |
66 | */ | |
67 | public function listTokens() { | |
68 | $tokens = CRM_Core_SelectValues::contactTokens(); | |
69 | return $tokens; | |
70 | } | |
71 | ||
6a488035 | 72 | } |