From 11972639df8315753123ebccdadee1f596807ad0 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 16 Sep 2014 08:03:29 +0000 Subject: Integrated new EasyGiant Library --- h-source/Library/Lang/En/Formats/Fields.php | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 h-source/Library/Lang/En/Formats/Fields.php (limited to 'h-source/Library/Lang/En/Formats/Fields.php') diff --git a/h-source/Library/Lang/En/Formats/Fields.php b/h-source/Library/Lang/En/Formats/Fields.php new file mode 100644 index 0000000..c91a1f0 --- /dev/null +++ b/h-source/Library/Lang/En/Formats/Fields.php @@ -0,0 +1,46 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_En_Formats_Fields +{ + + public static function getLabel($fieldName) + { + if (strstr($fieldName,",")) + { + $temp = explode(",",$fieldName); + for ($i=0; $i< count($temp); $i++) + { + $temp[$i] = self::getLabel($temp[$i]); + } + return implode (" and ",$temp); + } + else + { + $fieldName = str_replace("_"," ", $fieldName); + return ucfirst($fieldName); + } + } + +} -- cgit v1.2.3