From 4e9716f289758229cca01a5a1a5a7cf8a0855eb6 Mon Sep 17 00:00:00 2001 From: thiemen Date: Tue, 13 Aug 2019 14:26:11 +1200 Subject: [PATCH] PATCH: fixing filename for MySalesforceContactConfigApi --- code/Api/Contact/MySalesforceConfigApi.php | 144 --------------------- 1 file changed, 144 deletions(-) delete mode 100644 code/Api/Contact/MySalesforceConfigApi.php diff --git a/code/Api/Contact/MySalesforceConfigApi.php b/code/Api/Contact/MySalesforceConfigApi.php deleted file mode 100644 index 17ae46c..0000000 --- a/code/Api/Contact/MySalesforceConfigApi.php +++ /dev/null @@ -1,144 +0,0 @@ -get('MySalesforceContactConfigApi', 'site_wide_fields_to_send_on_creation'), - $array, - self::$run_time_fields_to_send_on_creation - ); - } - - /** - * @param array|DataList|null $mixed fields to send - * - * @return array - */ - public static function get_fields_to_send_on_update($mixed = null) - { - $array = self::mixed_to_array($mixed); - - return array_merge( - Config::inst()->get('MySalesforceContactConfigApi', 'site_wide_fields_to_send_on_update'), - $array, - self::$run_time_fields_to_send_on_update - ); - } - - /** - * @param array|DataList|null $mixed fields to send - * - * @return array|DataList|null - */ - public static function get_fields_for_filter($mixed = null) - { - $array = self::mixed_to_array($mixed); - - return array_merge( - Config::inst()->get('MySalesforceContactConfigApi', 'site_wide_filter_values'), - $array, - self::$run_time_fields_for_filter - ); - } - - /** - * @param DataList|array|string|null $mixed - * - * @return array - */ - protected static function mixed_to_array($mixed = null) - { - if ($mixed === null) { - $array = []; - } elseif ($mixed instanceof SS_List) { - $array = []; - foreach ($mixed as $object) { - $array[trim($object->Key)] = $object->BetterValue(); - } - } elseif (is_string($mixed)) { - $array = [$mixed]; - } elseif (is_array($mixed)) { - $array = $mixed; - } else { - $array = []; - user_error('Variable ' . print_r($mixed, 1) . ' should be an array. Currently, it is a ' . gettype($mixed)); - } - - return $array; - } -}