toDropdownMap($key, $val) : array(); } /** * Ensures proper form for classnames, fieldnames. No spaces, UpperCamelCase * * @param string $str The string to process * @return string */ public static function proper_form($str) { return str_replace(" ","",ucwords($str)); } /** * If only a single tab name is given, make it easy and apply it to "Root.Content" * * @param string $tab The name of the tab * @return string */ public static function clean_tab($tab) { if(false === stristr($tab,"Root.")) $tab = "Root.Content.{$tab}"; return $tab; } /** * If a null label is provided, run it through {@see FormField::name_to_label()} * * @param string $label A label for the field * @param string $name The name of the field * @return string */ public static function get_label($label, $name) { if(!$label) return FormField::name_to_label($name); return $label; } }