public static function attribute_label(Jam_Meta $meta, $attribute_name) { if ($attribute = $meta->attribute($attribute_name)) { $label = $attribute->label; } else { $label = Inflector::humanize($attribute_name); } return UTF8::ucfirst($label); }