+ return $entity;
+ }
+ }
+
+ public static function normalizeActionName($action, $version) {
+ if ($version <= 3) {
+ // APIv1-v3 munges entity/action names, and accepts any mixture of case and underscores.
+ // We normalize action to be lowercase.
+ return strtolower(\CRM_Utils_String::munge($action));
+ }
+ else {
+ // APIv4 requires exact spelling & capitalization of entity/action name; deviations should cause errors