* Set default values for the form.
*/
public function setDefaultValues() {
- $defaults = array();
+ $defaults = [];
if ($this->_mailingID) {
$defaults['approval_status_id'] = $this->_mailing->approval_status_id;
$defaults['approval_note'] = $this->_mailing->approval_note;
unset($mailApprovalStatus[$noneOptionID]);
}
- $this->addRadio('approval_status_id', ts('Approval Status'), $mailApprovalStatus, array(), NULL, TRUE);
+ $this->addRadio('approval_status_id', ts('Approval Status'), $mailApprovalStatus, [], NULL, TRUE);
- $buttons = array(
- array(
+ $buttons = [
+ [
'type' => 'next',
'name' => ts('Save'),
'spacing' => ' ',
'isDefault' => TRUE,
- ),
- array(
+ ],
+ [
'type' => 'cancel',
'name' => ts('Cancel'),
- ),
- );
+ ],
+ ];
$this->addButtons($buttons);
// add the preview elements
- $preview = array();
+ $preview = [];
$preview['subject'] = CRM_Core_DAO::getFieldValue('CRM_Mailing_DAO_Mailing',
$this->_mailingID,
// get the submitted form values.
$params = $this->controller->exportValues($this->_name);
- $ids = array();
+ $ids = [];
if (isset($this->_mailingID)) {
$ids['mailing_id'] = $this->_mailingID;
}
}
if (!$ids['mailing_id']) {
- CRM_Core_Error::fatal();
+ CRM_Core_Error::statusBounce(ts('No mailing id has been able to be determined'));
}
$params['approver_id'] = $this->_contactID;