protected function getMergeFieldsMap($fields = [])
    {
        $data = ArrayData::create([]);

        foreach ($fields as $field) {
            $data->setField($field->Name, DBField::create_field('Text', $field->Value));
        }

        return $data;
    }
protected function getMergeFieldsMap($fields = [])
    {
        $data = ArrayData::create([]);

        foreach ($fields as $field) {
            $data->setField($field->Name, DBField::create_field('Text', $field->Value));
        }

        return $data;
    }
protected function getMergeFieldsMap ( $ fields = [ ] ) { $ data = ArrayData :: create ( [ ] ) ; foreach ( $ fields as $ field ) { $ data -> setField ( $ field -> Name , DBField :: create_field ( 'Text' , $ field -> Value ) ) ; } return $ data ; }
Allows the use of field values in email body.

@param ArrayList $fields
@return ArrayData
Allows the use of field values in email body .