+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
*/
/**
*/
protected $_surveyTitle;
-
/**
* Set variables up before form is built.
*/
}
$this->_surveyId = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
- $params = array('id' => $this->_surveyId);
+ $params = ['id' => $this->_surveyId];
CRM_Campaign_BAO_Survey::retrieve($params, $surveyInfo);
$this->_surveyTitle = $surveyInfo['title'];
$this->assign('surveyTitle', $this->_surveyTitle);
* Build the form object.
*/
public function buildQuickForm() {
- $this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Delete'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
+ $this->addButtons([
+ [
+ 'type' => 'next',
+ 'name' => ts('Delete'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
/**
public function postProcess() {
if ($this->_surveyId) {
CRM_Campaign_BAO_Survey::del($this->_surveyId);
- CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", array(1 => $this->_surveyTitle)), 'success');
+ CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", [1 => $this->_surveyTitle]), 'success');
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'));
}
else {