+ /**
+ * Get possible thousand separators.
+ *
+ * @return array
+ */
+ public function getThousandSeparators() {
+ return array(array('.'), array(','));
+ }
+
+ /**
+ * Set the separators for thousands and decimal points.
+ *
+ * @param string $thousandSeparator
+ */
+ protected function setCurrencySeparators($thousandSeparator) {
+ Civi::settings()->set('monetaryThousandSeparator', $thousandSeparator);
+ Civi::settings()
+ ->set('monetaryDecimalPoint', ($thousandSeparator === ',' ? '.' : ','));
+ }
+
+ /**
+ * Format money as it would be input.
+ *
+ * @param string $amount
+ *
+ * @return string
+ */
+ protected function formatMoneyInput($amount) {
+ return CRM_Utils_Money::format($amount, NULL, '%a');
+ }
+