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
17 class CRM_SMS_Controller_Send
extends CRM_Core_Controller
{
22 * @param string $title
23 * @param bool|int $action
26 * @throws \CRM_Core_Exception
28 public function __construct($title = NULL, $action = CRM_Core_Action
::NONE
, $modal = TRUE) {
29 parent
::__construct($title, $modal, NULL, FALSE, TRUE);
31 $mailingID = CRM_Utils_Request
::retrieve('mid', 'String', $this);
33 // also get the text and html file
34 $txtFile = CRM_Utils_Request
::retrieveValue('txtFile', 'String');
36 $config = CRM_Core_Config
::singleton();
38 file_exists($config->uploadDir
. $txtFile)
40 $this->set('textFilePath', $config->uploadDir
. $txtFile);
43 $this->_stateMachine
= new CRM_SMS_StateMachine_Send($this, $action, $mailingID);
45 // create and instantiate the pages
46 $this->addPages($this->_stateMachine
, $action);
48 // add all the actions
49 $uploadNames = array_merge(['textFile'],
50 CRM_Core_BAO_File
::uploadNames()
53 $this->addActions(CRM_Core_Config
::singleton()->uploadDir
,