$this->get('exportMode')
);
- $this->addButtons(array(
- array(
- 'type' => 'back',
- 'name' => ts('Previous'),
- ),
- array(
- 'type' => 'next',
- 'name' => ts('Export'),
- 'spacing' => ' ',
- ),
- array(
- 'type' => 'done',
- 'icon' => 'fa-times',
- 'name' => ts('Done'),
- ),
- )
- );
+ $this->addButtons([
+ [
+ 'type' => 'back',
+ 'name' => ts('Previous'),
+ ],
+ [
+ 'type' => 'next',
+ 'name' => ts('Export'),
+ 'spacing' => ' ',
+ ],
+ [
+ 'type' => 'done',
+ 'icon' => 'fa-times',
+ 'name' => ts('Done'),
+ ],
+ ]);
}
/**
* list of errors to be posted back to the form
*/
public static function formRule($fields, $values, $mappingTypeId) {
- $errors = array();
+ $errors = [];
if (!empty($fields['saveMapping']) && !empty($fields['_qf_Map_next'])) {
$nameField = CRM_Utils_Array::value('saveMappingName', $fields);
}
if (!empty($params['saveMapping'])) {
- $mappingParams = array(
+ $mappingParams = [
'name' => $params['saveMappingName'],
'description' => $params['saveMappingDesc'],
'mapping_type_id' => $this->get('mappingTypeId'),
- );
+ ];
$saveMapping = CRM_Core_BAO_Mapping::add($mappingParams);